/ examples / circuitplayground_button_a.py
circuitplayground_button_a.py
1  """This example turns on the little red LED when button A is pressed."""
2  from adafruit_circuitplayground.express import cpx
3  
4  while True:
5      if cpx.button_a:
6          print("Button A pressed!")
7          cpx.red_led = True