-->
Page 1 of 1

UART between Arduino UNO and ESP8266

PostPosted: Mon Aug 31, 2020 6:25 am
by Wicked
Im working on a project that uses an Arduino UNO that reads some sensor data , and sends them on further to a NodeMCU ESP8266 , and from there I display them on a webpage.

This is working properly , im using the Rx/Tx pins of both boards and level shifter ( bc the esp takes only 3.6V ) and I'm getting my data displayed . I send them once every 3 seconds .

I simply do ( on UNO ):

Code: Select allSerial.println(data);


And in ESP :

Code: Select allSerial.readStringUntil('\n')



Now I want to implement the same thing, but to send from ESP to Arduino , some data. Like , I have a button on my webpage and when its pressed, I want to send "1" to my arduino so I can start a motor or something .

I cant make it work. To send and receive data * at the same time * for both boards.

If someone can help me, I'll appreciate . Thanks !