def roboragemode():
- for i in range(0,200):
- - humm.set_servo(2, 0)
- - humm.set_servo(3, 0)
- - humm.set_tricolor_led(1, 0, 0, 0)
- - humm.set_tricolor_led(2, 255, 0, 0)
- - humm.set_single_led(1,0)
- - time.sleep(1)
- - humm.set_servo(2, 30)
- - humm.set_servo(3, 30)
- - humm.set_tricolor_led(1, 0, 0, 255)
- - humm.set_tricolor_led(2, 0, 255, 0)
- - humm.set_single_led(1, 255)
- - time.sleep(1)
def key(event):
- key_pressed = event.char
-if key_pressed == "r":
- -roboragemode()
-else:
- - turn_off()
key()
Back to main website: Main Page!