Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
User guide ADC
Any type of sensor with an analogue output can be used. Note that the Esp8266 only has one analogue input, A0. On NodeMCU this is D3 GPIO0. Example usage: Connect an IR-transistor between 3V3 and A0, then a resistor (470k) between A0 and Gnd. The gateway will then send a value that depends on the light level in the room.
If you want to use this sensor uncomment in user_config
To change the Mqtt-topic change home/ADCtoMQTT in config_ADC.h:
#define ADC "home/ADCtoMQTT"
The value is between 0 and 1024 and is tranmitted via Mqtt when it changes.