circuitplayground_play_tone_buttons.py
1 """This example plays a different tone for a duration of 1 second for each button pressed.""" 2 from adafruit_circuitplayground.express import cpx 3 4 while True: 5 if cpx.button_a: 6 cpx.play_tone(262, 1) 7 if cpx.button_b: 8 cpx.play_tone(294, 1)