Differences

This shows you the differences between two versions of the page.

Link to this comparison view

blog:nodemcu_with_micropython [2017/05/14 10:23] (current)
jpk created
Line 1: Line 1:
 +====== NodeMCU with MicroPython ======
 +
 +''/​boot.py'':​
 +<code python>
 +# This file is executed on every boot (including wake-boot from deepsleep)
 +#import esp
 +#​esp.osdebug(None)
 +import gc
 +import network
 +import time
 +import webrepl
 +sta = network.WLAN(network.STA_IF)
 +sta.active(True)
 +sta.connect('​SSID',​ '​Passphrase'​)
 +retries = 3
 +if retries > 0 or not sta.isconnected():​
 +    time.sleep(1)
 +    retries -= 1
 +webrepl.start()
 +gc.collect()
 +</​code>​
 +
 +~~LINKBACK~~
 +~~DISCUSSION~~
  
Last modified: le 2017/05/14 10:23