Hello,
I'm new to esp and micropython so please excuse me
So I have written a boot.py that connects to my wifi and if successful starts webrepl.
So far so good, it works when I have plugged it in an restart it (Hard-reset or soft), but it doesnt if I plug in the esp. I first have to restart it.
It gets an IP Adress is pingable and so on, but webrepl doesnt work.
Thank you!
***
import network
import time
sta_if = network.WLAN(network.STA_IF)
ap_if = network.WLAN(network.AP_IF)
ap_if.active(False)
sta_if.active(True)
sta_if.connect('MyWifi', 'password')
time.sleep(5)
if sta_if.isconnected():
print('WLAN connection established!')
print('IP, Mask, Gateway, DNS ', sta_if.ifconfig())
time.sleep(2)
print('webREPL')
try:
import webrepl
time.sleep(1)
webrepl.start()
except:
import machine
machine.reset()
***
Problem with webrepl on startup (boot.py)
-
- Posts: 2
- Joined: Sun Oct 30, 2016 11:13 am