diff --git a/src/boot.py b/src/boot.py index bd892c1..b0eb875 100644 --- a/src/boot.py +++ b/src/boot.py @@ -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) \ No newline at end of file +name = s.get('name', 'led') +wifi.ap(name, '')