Toggle Navigation
Hatchery
Eggs
Kantoor
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
import ugfx, gc, wifi, badge, deepsleep from time import sleep import urequests as requests # Make sure WiFi is connected wifi.init() # Wait for WiFi connection while not wifi.sta_if.isconnected(): sleep(1) pass ugfx.init() # fetching data url = "https://xiz.nl/xiz/kantoor.php" r = requests.get(url) gc.collect() data = r.text.splitlines() r.close() buiten = data[0].split('|')[1].split(',')[0] eersteverdieping = data[1].split('|')[1].split(',')[0] tweedeverdieping = data[2].split('|')[1].split(',')[0] beganegrond = data[3].split('|')[1].split(',')[0] MensenOpKantoor = data[4].split('|')[1].split(',')[0] MensenInKantine = data[5].split('|')[1].split(',')[0] # displaying forecast ugfx.clear(); #ugfx.line(0, 26, 296, 26, 0) #ugfx.line(0, 44, 296, 44, 0) ugfx.string(5, 5, buiten, "pixelade13", 0) ugfx.string(5, 15, eersteverdieping, "pixelade13", 0) ugfx.string(5, 25, tweedeverdieping, "pixelade13", 0) ugfx.string(5, 35, beganegrond, "pixelade13", 0) ugfx.string(5, 45, MensenOpKantoor, "pixelade13", 0) ugfx.string(5, 55, MensenInKantine, "pixelade13", 0) ugfx.flush(ugfx.LUT_FULL); badge.eink_busy_wait() deepsleep.start_sleeping(300000)