If you are a regular Hackaday reader, you’ve probably seen plenty of ESP8266 projects ... the onboard CPU runs a stock firmware that exposes an AT command set or Lua or even BASIC.
The ESP8266 has all sorts of communication and ... it’s best to use an actual line driver, such as the $1.50 ISL3177 since it is much more sensitive, powerful, has better protection and slew ...