-->
Page 1 of 1

UART #0 lua pins

PostPosted: Thu Feb 26, 2015 8:54 pm
by Vitoa
Hi, uart index 0 is linked to esp8266 tx and rx pins?
If some peripheral send data to esp8266 rx pin it goes to nodemcu interpreter ...How can avoid this?
It should link uart to other pins to avoid data going to interpreter..

***Found answer*****

run_input: 0 or 1, 0: input from uart will not go into lua interpreter, can accept binary data.
1: input from uart will go into lua interpreter, and run.

uart.on("data", 4,
function(data)
print("receive from uart:", data)
end
end, 0)

Last field must be at 0 in order to avoid lua interpreter input


Have fun with esp8266 :D