code.py
1 # SPDX-FileCopyrightText: 2018 Kattni Rembor for Adafruit Industries 2 # 3 # SPDX-License-Identifier: MIT 4 5 from adafruit_circuitplayground.express import cpx 6 7 cpx.pixels.brightness = 0.3 8 9 while True: 10 if cpx.button_a: 11 cpx.pixels[2] = (0, 255, 0) 12 elif cpx.button_b: 13 cpx.pixels[7] = (0, 0, 255) 14 else: 15 cpx.pixels.fill((0, 0, 0))