Toggle Navigation
Hatchery
Eggs
Virus
__init__.py
Login
Register
__init__.py
Content
import ugfx, samd import random def clear(): ugfx.clear(ugfx.WHITE) ugfx.flush() def draw(): clear() invert = False count = 0 while True: x = random.randrange(123) y = random.randrange(59) ugfx.area(x,y,5,5,ugfx.WHITE if invert else ugfx.BLACK) ugfx.string(15,10,"X_X","PermanentMarker36", ugfx.BLACK if invert else ugfx.WHITE) ugfx.flush() count += 1 if count >= 700: invert = not invert count = 0 if count >= 600: fr = random.randint(1, 25) t = 1 samd.buzzer(fr,t) i = random.randint(0, 5) r = random.randint(0, 1) g = random.randint(0, 1) b = random.randint(0, 1) samd.led(i,r,g,b) def main(): draw() main()