Toggle Navigation
Hatchery
Eggs
Flashboii
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
import rgb import time import random import buttons, defines rgb.clear() pixels = [] pixel_speed = 0.05 rgb.setbrightness(30) def init(): rgb.clear() rgb.background((random.randint(1, 256), random.randint(1, 256), random.randint(1, 256))) def callback_button_up(button_is_down): if button_is_down: global pixel_speed pixel_speed = pixel_speed * 1.2 pass buttons.register(defines.BTN_UP, callback_button_up) def callback_button_down(button_is_down): if button_is_down: global pixel_speed pixel_speed = pixel_speed / 1.2 pass buttons.register(defines.BTN_DOWN, callback_button_down) while True: time.sleep(pixel_speed) init()