Toggle Navigation
Hatchery
Eggs
sponsors
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
import display, utime, system try: directory = '/'.join(__file__.split('/')[:-1]) except: directory = '/' print("Current directory: {}".format(directory)) def show_sponsors(directory): for x in range(1, 8): display.drawFill(0xFFFFFF) try: file = '{}/sponsor{}.png'.format(directory, x) display.drawPng(0,0,file) print("Showing file {}".format(file)) except: display.drawText(0, 0, "SPONSOR LOAD ERROR {}".format(x), 0x000000, "Roboto_Regular12") print("SPONSOR LOAD ERROR {}".format(x)) display.flush(display.FLAG_LUT_GREYSCALE) utime.sleep(4) show_sponsors(directory) system.home()