make password configs be in a different file, don't publish passwords in git
This commit is contained in:
parent
3a17e7f218
commit
2f8c2ef767
|
@ -96,3 +96,5 @@ ENV/
|
|||
|
||||
.idea/
|
||||
.vscode/
|
||||
/wifi_cfg.py
|
||||
/webrepl_cfg.py
|
10
boot.py
10
boot.py
|
@ -1,5 +1,6 @@
|
|||
from network import WLAN as wlan, STA_IF as staif, AP_IF as apif
|
||||
from time import sleep_ms
|
||||
from wifi_cfg import wlan_nets
|
||||
|
||||
sleep_ms(100)
|
||||
#make sure AP mode is off and station mode is on
|
||||
|
@ -15,12 +16,9 @@ if wlan(staif).isconnected() != True:
|
|||
nets=wlan(staif).scan()
|
||||
found_net=False
|
||||
for net in nets:
|
||||
if net[0] == b'WiFiNetworkName':
|
||||
wlan(staif).connect("WiFiNetworkName","WiFiNetworkPSK")
|
||||
found_net=True
|
||||
break
|
||||
elif net[0] == b'WiFiNetworkName':
|
||||
wlan(staif).connect("WiFiNetworkName","WiFiNetworkPSK")
|
||||
for cfg_net in wlan_nets.keys():
|
||||
if net[0] == b'%s' % cfg_net:
|
||||
wlan(staif).connect(cfg_net, wlan_nets[cfg_net])
|
||||
found_net=True
|
||||
break
|
||||
if found_net == False:
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
PASS='MyWebREPLPassword'
|
|
@ -0,0 +1,3 @@
|
|||
wlan_nets={
|
||||
'YourNetwork': 'YourPSK',
|
||||
}
|
Loading…
Reference in New Issue