-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmain.py
More file actions
25 lines (18 loc) · 636 Bytes
/
Copy pathmain.py
File metadata and controls
25 lines (18 loc) · 636 Bytes
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
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
main script, do your stuff here, similar to the loop() function on Arduino
"""
from wifi_manager import WiFiManager
wm = WiFiManager()
# if there is enough RAM on the board, may increase the buffer size on send
# stream operations to read bigger chunks from disk, default is 128
# wm.app.SEND_BUFSZ = 1024
result = wm.load_and_connect()
print('Connection result: {}'.format(result))
if result is False:
print('Starting config server')
wm.start_config()
else:
print('Successfully connected to a network :)')
print('Finished booting steps of MicroPython WiFiManager')