-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfuncs.py
36 lines (26 loc) · 796 Bytes
/
funcs.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
32
33
34
35
import network
import ubinascii
from machine import Pin
import secrets
button_pin = Pin(0)
# Updating neopixel values has been moved to pixel.py
def get_uuid():
wlan_sta = network.WLAN(network.STA_IF)
wlan_sta.active(True)
wlan_mac = wlan_sta.config('mac')
mac = ubinascii.hexlify(wlan_mac).decode()
return "ebc626d8-6ddb-437c-8210-{}".format(mac)
def conn():
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(secrets.SSID, secrets.PASSWORD)
# print(wlan.isconnected())
return wlan
# Cycle a pin several times to identify if it works properly...
# def test_pin(num):
# pin_num = Pin(num, Pin.OUT)
# for each in range(10):
# pin_num.off()
# time.sleep(.25)
# pin_num.on()
# time.sleep(.25)