Wednesday 23 June 2021

Wemos, MQTT, and Analog input

 So far I have the wemos program sending commands via MQTT from the Forward,Stop,Backwards, Left and Right buttons. At one point I discovered that the IO port A0 was Analog not digital. I have connected a Potentiometer  to this and now want to start using it to expand my work with MQTT. Initially I am going to send either 'Left' or 'Right' depending on the value read. 

 I am starting with the program by Random Nerd: https://randomnerdtutorials.com/esp8266-adc-reading-analog-values-with-nodemcu/ to measure the values to the left and right. Then I will use this technique in my program 'g'. 

Thing is wired wrong. No voltage into pot, and centre pin to 3V3 pin. 

Tomorrow.....