Toggle Navigation
Hatchery
Eggs
35C3
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
import badge import ugfx import time import deepsleep badge.init() ugfx.init() ugfx.input_init() badge.leds_init() badge.leds_enable() def close(pressed): if pressed: deepsleep.reboot() ugfx.input_attach(ugfx.BTN_B, close) ugfx.set_lut(ugfx.LUT_NORMAL) ugfx.clear(ugfx.WHITE) badge.eink_png(0,0,'/lib/35c3/35c3.png') ugfx.flush() leds_array = bytes(24) def nextled(): badge.leds_send_data(leds_array) time.sleep(0.3) while True: leds_array = bytes([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0]) nextled() leds_array = bytes([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]) nextled() leds_array = bytes([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0]) nextled() leds_array = bytes([0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) nextled() leds_array = bytes([0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) nextled() leds_array = bytes([1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) nextled() leds_array = bytes([0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) nextled() leds_array = bytes([0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) nextled() leds_array = bytes([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0]) nextled() leds_array = bytes([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]) nextled()