Post your best Lua script examples here

User avatar
By iburak
#47876 Hi everyone
I am new ESP8266 and i am trying to program ESP8266 with LUA. I have to get RSSI data from AP and send PC then use these RSS value on the C platform. How can i do that? I tried to send RSSI value to TCP server but i cant. I mean

rv=net.createServer(net.TCP)
srv:listen(80,function(conn)
conn:on("receive",function(conn,payload)
print(payload)
conn:send("Hello, NodeMCU!!! ")
end)
conn:on("sent",function(conn) conn:close() end)
end)

this code is writing "Hello NodeMCU" on the screen but i wanna write RSSI value that is taken by itself and maybe i can get this values from TCP to PC and i can progress in C platform. Am I right or any suggestion?