Files
NodeMCU_Lua/Websocket/nodemcu-webide/bin/led-matrix.lua
Christian Zufferey 8abc823276 - commencé à bosser sur les websocket, ce n'est pas en yaka :-(
- essayé d'installer webide sur NodeMCU, il y a justement un exemple de websocker server, je n'arrive pas encore à comprendre comment cela marche
- donc il y a encore pas mal de taf
2018-11-02 23:02:02 +01:00

13 lines
315 B
Lua
Executable File

return function (connection, req, args)
dofile('httpserver-header.lc')(connection, 200, 'html')
if req.method == 'POST' then
local rd = req.getRequestData()
if (rd['data'] ~= nil) then
print("data: ",rd['data'])
ws2812.write(rd['data'])
end
end
collectgarbage()
end