-
Notifications
You must be signed in to change notification settings - Fork 1
/
boot.py
31 lines (26 loc) · 887 Bytes
/
boot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import sys
# add module search path
sys.path.append('/flash/apps')
sys.path.reverse() #revert search direction to load custom libs first
from machine import SDCard
from machine import Pin
import os
import time
#import webrepl
try:
sd = SDCard(slot=3, miso=Pin(38), mosi=Pin(23), sck=Pin(18), cs=Pin(4))
sd.info()
os.mount(sd, '/sd')
print('Ctrl+C to interrupt!')
time.sleep_ms(2000)
print("SD card mounted at \"/sd\"")
# wifiCfg.autoConnect(lcdShow=True)
# wifiCfg.doConnect('Horst1', '1234567890123')
# print("Wifi connected: ", str(wifiCfg.is_connected()))
# print(wifiCfg.wlan_sta.ifconfig())
# _webrepl.password('chopper')
# webrepl.setup_conn(8266, accept_conn)
# print("Started webrepl in normal mode")
except (KeyboardInterrupt, Exception) as e:
# print('SD mount caught exception {} {}'.format(type(e).__name__, e))
pass