Toggle Navigation
Hatchery
Eggs
BlinkenLights
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
import display, time, random #load neccesary API's #set available colors: colorlist = [0xFFFFFF,0x00FF00,0xFF0000,0x0000FF,0x000000,0x80000,0xFFFF00,0xFF00FF,0xFFC300] while True: #Loop forever #pick a color for each pixel from the colorlist display.drawPixel(0,0,(random.choice(colorlist))) display.drawPixel(0,1,(random.choice(colorlist))) display.drawPixel(0,2,(random.choice(colorlist))) display.drawPixel(0,3,(random.choice(colorlist))) display.drawPixel(1,0,(random.choice(colorlist))) display.drawPixel(1,1,(random.choice(colorlist))) display.drawPixel(1,2,(random.choice(colorlist))) display.drawPixel(1,3,(random.choice(colorlist))) display.drawPixel(2,0,(random.choice(colorlist))) display.drawPixel(2,1,(random.choice(colorlist))) display.drawPixel(2,2,(random.choice(colorlist))) display.drawPixel(2,3,(random.choice(colorlist))) display.drawPixel(3,0,(random.choice(colorlist))) display.drawPixel(3,1,(random.choice(colorlist))) display.drawPixel(3,2,(random.choice(colorlist))) display.drawPixel(3,3,(random.choice(colorlist))) display.flush() #write to framebuffer time.sleep_ms(random.randint(75,600)) #wait random number of milliseconds