For that, i'm trying the following code (The sensor works only in 115200):
uart.setup( 0,115200,8,0,1,0 )
srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
conn:on("receive",function(conn,payload)
uart.write( 0, "0x55AA24010200010000000000000000000000000000002701")
conn:send("<h1> Turning on LED.</h1>")
end)
conn:on("sent",function(conn) conn:close() end)
end)
Is it ok to send an hex command in that way? What could be wrong?