from adafruit_circuitplayground import cp while True: cp.red_led = cp.switch
另外的按键就是两个轻触按键(D4、D5):
from adafruit_circuitplayground import cp while True: if cp.button_b: cp.red_led = True else: cp.red_led = False