国内综合精彩aⅤ无码不卡_日本少妇做爰全过程_欧美性爱在线播放免费_午夜?V日韩一区二区_免费a级毛片无码免费播放_成在人线av无码喷水_亚洲精品网站色视频_国产婷婷精品成人_老师撩起裙子让我桶的视频_秋霞影院国产

8266對接天貓精靈固件

作者:GAO0594 | 更新時間:2019-11-05 | 瀏覽量:1833

8266對接天貓精靈固件,誰有?

LED =3 gpio.mode(LED,gpio.OUTPUT) cu = net.createConnection(net.TCP) cu:connect(port, host) ok, s = pcall(sjson.encode, {M="checkin",ID=DEVICEID,K=APIKEY}) if ok then print(s) else print("failed to encode!") end cu:on("receive", function(cu, c) print(c) r = sjson.decode(c) if r.M == "say" then if r.C == "play" then gpio.write(LED, gpio.HIGH) ok, played = pcall(sjson.encode, {M="say",ID=r.ID,C="LED turn on!"}) cu:send( played.."\n" ) end if r.C == "stop" then gpio.write(LED, gpio.LOW) ok, stoped = pcall(sjson.encode, {M="say",ID=r.ID,C="LED turn off!"}) cu:send( stoped.."\n" ) end end end) tmr.create():alarm(20000, tmr.ALARM_AUTO, function() cu:send( s.."\n" ) print(s) end)

評論:共2條

GAO0594 評論于:2019-10-30 00:22:52
01S的,ESP-12F 5路輸出口。
GAO0594 評論于:2019-11-05 15:47:32
8266刷固件工具我有,我的Q我
編譯工具源代碼以及環(huán)境配置,有沒有大蝦指教一下?/
返回頂部