Toggle Navigation
Hatchery
Eggs
Badge_buzz_test
__init__.py
Login
Register
__init__.py
Content
import easydraw, system, ugfx, sys, samd import random, time def action_exit(pushed): if (pushed): # go back to the home screen system.home() def show_names(): easydraw.msg("Buzzer test!") # do the magick endlesly while True: fr = random.randint(1, 40) t = random.randint(1, 2) samd.buzzer(fr, t) time.sleep(0.1) 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()