As the title says... Chat on...

User avatar
By Help
#35837 I am currently woking on a project where an ESP8266-01 hosts a webpage with a few buttons on it. The esp8266 wifi module has been flashed with version 0.9.6 NodeMCU firmware. I have programmed the wifi module to send a command serially to the microcontroller when a button on the webpage is pressed. The micro controller responds by sending back an analog value of one of its ports.

My question is, can I easily store the 3 digit analog value sent from the microcontroller to the wifi module in a variable? I have been using the UART.on function and then writing the received data to a blank text document. Then in my main file I have been reading the text file and storing its contents in a variable. I am then able to send this variable to the web page. This is a huge pain, why would the UART.on function only return a nil value?