count = 0
-- set uart0 with 1200 baud rate, 8 databits, no pariy, 1 stop bit with echo
uart.setup(0,1200,8,0,1,1)
while true do -- continuous send count
print(count)
count = count + 1
tmr.delay(1000000)
end
and this one at the receiver:
-- set uart0 with 1200 baud rate, 8 databits, no pariy, 1 stop bit with echo
uart.setup(0,1200,8,0,1,1)
--print received data
uart.on("data", "\n", function(data) print("receive from uart:", data) end, 0)
But in both cases, when try to config the uart i lost connection in esplorer. I'm using nodemcu v3, is there any way to configure other serial port for this?