How to read an analogue voltage with an 8266 in ESPHome


Experimenting with ESPHome and a NODEMCU I have a project where I need to pass data from an arduino-UNO to an 8266 for reception in Home Assistant (HASS IO). What is the best way to do this?

  1. I thought about outputting a corrosponding voltage on one of the Arduino’s D-A ports and then reading it back on a A-D port on the 8266 (A0) but couldn’t find a component to read an analogue level…? Surely there is one?

  2. The other option was to pass it digitally to the 8266, would I2c be easiest?


A-D sensor:

What sort of data are you sending?

Why not just publish data from the UNO via mqtt?

That would be easiest but my Arduino is doing lots of constant comm’s over RF with other devices so the serial port is constantly in use. That’s why I was thinking to run code in the 8266 to handle the WiFi comm’s as it does this nicely.

This is a transitional solution, I will eventually replace all my RF devices with 8266’s using WiFi Which will be much simpler.

Thanks for the link

Mqtt uses the network connection not the serial port. Or don’t you have wired network available?

No wired network…
Thats why I need an 8266 but cant communicate with it.