Update boot.py

This commit is contained in:
jimmy 2025-05-18 21:30:34 +12:00
parent 425511d41f
commit 14a70cb024
1 changed files with 4 additions and 15 deletions

View File

@ -1,19 +1,8 @@
import settings
import wifi
import time
from settings import Settings
print(wifi.ap('qwerty'))
s = Settings()
settings = Settings()
ssid = settings.get('wifi', {}).get('ssid', None)
password = settings.get('wifi', {}).get('password', None)
ip = settings.get('wifi', {}).get('ip', None)
gateway = settings.get('wifi', {}).get('gateway', None)
for i in range(10):
config = wifi.connect(ssid, password, ip, gateway)
if config:
print(config)
break
time.sleep(0.1)
name = s.get('name', 'led')
wifi.ap(name, '')