From 14e142615d07b64e2455fb41b28e8bab9be90f31 Mon Sep 17 00:00:00 2001 From: Silver Kuusik Date: Fri, 12 Jan 2018 10:23:12 +0100 Subject: [PATCH] fix wifi password, clean imports --- boot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/boot.py b/boot.py index 0782dfd..92b730b 100644 --- a/boot.py +++ b/boot.py @@ -1,13 +1,13 @@ +import ujson +import network from hal import * from time import sleep -import socket, re, os, uwebsockets, network, binascii, ujson print("Press Ctrl-C to stop boot script...") sleep(0.2) # read the config file config = ujson.loads(open("config.json", "r").read()) -print(config) # connect to WiFi wlan = network.WLAN(network.STA_IF) @@ -25,9 +25,9 @@ if not wlan.isconnected(): if ssid in config["wifis"].keys(): print("connecting to: " + ssid) # start to connect to the pre-configured network - wlan.connect(ssid, wifis[ssid]) + wlan.connect(ssid, config["wifis"][ssid]) break -# Clean up +# clean up import gc gc.collect()