• <table id="0ws66"></table>
  • <noscript id="0ws66"><source id="0ws66"></source></noscript>

    ESP8266 nodemcu 睡眠模式測試代碼

    作者:貝殼物聯 | 更新時間:2017-02-18 | 瀏覽量:2462

    先上代碼,nodemcu固件需包含 node , tmr 模組。

    local i = 0
    while (i < 10)
    do
        print( "no sleeping..." )
        tmr.delay(1000000)
        i = i + 1
    end
    print("sleeping start")
    node.dsleep(30000000, 4)

    代碼功能,esp8266模塊每隔10s,睡30s。運行效果如下:

    nodemcu sleep

    注:ESP8266模塊的GPIO16需與RST連接。


    評論:共0條

    返回頂部
    国产综合在线