Restart project based on regular ESP32 and Microdot
This commit is contained in:
parent
167847cd28
commit
56e7a1d2de
12 changed files with 1661 additions and 119 deletions
30
src/boot.py
30
src/boot.py
|
|
@ -1,26 +1,10 @@
|
|||
# boot.py -- run on boot-up
|
||||
# boot.py -- This file is executed on every boot (including wake-boot from deepsleep)
|
||||
|
||||
import network
|
||||
import pycom
|
||||
from lightbar import wlan_manager
|
||||
import webrepl
|
||||
|
||||
from config import Config
|
||||
import wlan_manager
|
||||
# Connect to WLAN as defined in wlan_cfg.py
|
||||
wlan_manager.connect()
|
||||
|
||||
# Disable Pybytes and smart configuration
|
||||
pycom.pybytes_on_boot(False)
|
||||
pycom.smart_config_on_boot(False)
|
||||
|
||||
# Load config from flash memory
|
||||
config = Config()
|
||||
config.load()
|
||||
|
||||
# Enable or disable heartbeat
|
||||
pycom.heartbeat(config.get('heartbeat'))
|
||||
|
||||
# Reconfigure FTP and Telnet server
|
||||
server = network.Server()
|
||||
server.deinit()
|
||||
server.init(login=(config.get('login_user'), config.get('login_password')), timeout=600)
|
||||
|
||||
# Connect to WLAN
|
||||
wlan_manager.connect(config)
|
||||
# Start WebREPL on default port 8266 with password defined in webrepl_cfg.PASS
|
||||
webrepl.start()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue