IRDA serial communication
Posted: Wed Oct 16, 2019 7:05 am
hi, i'm trying to transmit some data with IRDA, i'm trying with this code at emitter:
and this one at the receiver:
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?
Code: Select all
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:
Code: Select all
-- 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?