Toggle Navigation
Hatchery
Eggs
Cyberwehr
__init__.py
Login
Register
__init__.py
Content
import easydraw, system, badge, ugfx, sys import random, time def action_exit(pushed): if (pushed): # to turn off all the leds at ones badge.led(6,0,0,0) # go back to the home screen system.home() def show_names(): ugfx.clear(ugfx.WHITE) displaytext = "CYBER" #Gruesse gehen raus an meine oesterreichischen Cybernerds! ugfx.string(0, 0, displaytext,"PermanentMarker36", ugfx.BLACK) ugfx.flush() badge.init() # do the magick endlesly while True: r = random.randint(0, 1) b = 0 if r == 0: b = 1 else: b = random.randint(0, 1) for i in range(0,3): badge.led(0,r,0,b) badge.led(1,b,0,r) badge.led(2,r,0,b) time.sleep(0.01) badge.led(0,0,0,0) badge.led(1,0,0,0) badge.led(2,0,0,0) time.sleep(0.01) time.sleep(0.1) for i in range(0,3): badge.led(3,r,0,b) badge.led(4,b,0,r) badge.led(5,r,0,b) time.sleep(0.01) badge.led(3,0,0,0) badge.led(4,0,0,0) badge.led(5,0,0,0) time.sleep(0.01) def main(): ugfx.input_init() ugfx.input_attach(ugfx.BTN_B, action_exit) ugfx.input_attach(ugfx.BTN_START, action_exit) show_names() sys.stdin.read(1) #Wait for any key action_exit(True) main()