I've finally managed to install the micropython platform on the wemos D1 Mini. Now I'm following the micropython docs. When I do os.listdir() I only get the boot.py file. Not the main.py as shown in the docs. Is this second file necessary?
Follwing on that small note/question. How do I change the boot.py in minicom on mac to add following start up script.
Code: Select all
def do_connect():
import network
sta_if = network.WLAN(network.STA_IF)
if not sta_if.isconnected():
print('connecting to network...')
sta_if.active(True)
sta_if.connect('<essid>', '<password>')
while not sta_if.isconnected():
pass
print('network config:', sta_if.ifconfig())