Toggle Navigation
Hatchery
Eggs
nixie
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
import i2c, time, display try: directory = '/'.join(__file__.split('/')[:-1]) except: directory = '/' print("Current directory: {}".format(directory)) try: i2c.i2c_write_reg(0x41, 0x03, bytes([0xF0])) except: print("SAO communication error #1") display.drawFill(0xFFFFFF) display.drawPng(0,0,"{}/tilde.png".format(directory)) display.flush(display.FLAG_LUT_GREYSCALE) while 1: for i in range(0x0F): try: i2c.i2c_write_reg(0x41, 0x01, bytes([0xF0 | i])) except: print("SAO communication error #2") print(i) time.sleep(1)