Buttons
The StudioBot has two push buttons that can be used to collect user input.
import time
import board
from StudioBot import *
while True:
if buttons.is_1_pressed():
print("Switch 1 On")
else:
print("Switch 1 Off")
if buttons.is_2_pressed():
print("Switch 2 On")
else:
print("Switch 2 Off")
time.sleep(0.01) # debounce delayLast updated