Toggle Navigation
Hatchery
Eggs
Sapling CZ
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
import machine, system, term_menu, virtualtimers, tasks.powermanagement as pm, buttons, defines, woezel import rgb saplings = [0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x51feb2ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x51feb2ff, 0x000000ff, 0x000000ff] def input_left(pressed): pm.feed() if pressed: rgb.setbrightness(rgb.getbrightness() - 2) def input_right(pressed): pm.feed() if pressed: rgb.setbrightness(rgb.getbrightness() + 2) buttons.register(defines.BTN_LEFT, input_left) buttons.register(defines.BTN_RIGHT, input_right) rgb.clear() rgb.framerate(2) rgb.gif(saplings, (0, 0), (32, 8), 3)