Current Lua downloadable firmware will be posted here

User avatar
By juanmol
#84184 hi, i'm trying to transmit some data with IRDA, i'm trying with this code at emitter:
Code: Select allcount = 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?
User avatar
By marcelstoer
#84187 https://nodemcu.readthedocs.io/en/latest/modules/uart/

Although there are two UARTs(0 and 1) available to NodeMCU, UART 1 is not capable of receiving data and is therefore transmit only.


As for tmr.delay(1000000) please see this: https://nodemcu.readthedocs.io/en/lates ... /#tmrdelay