code.py
 1  # SPDX-FileCopyrightText: 2021 Trevor Beaton for Adafruit Industries
 2  #
 3  # SPDX-License-Identifier: MIT
 4  
 5  import time
 6  import board
 7  import neopixel
 8  
 9  pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=0.2, auto_write=False)
10  PURPLE = (10, 0, 25)
11  PINK = (25, 0, 10)
12  OFF = (0,0,0)
13  
14  while True:
15      pixels.fill(PURPLE)
16      pixels.show()
17      time.sleep(0.5)
18      pixels.fill(OFF)
19      pixels.show()
20      time.sleep(0.5)
21      pixels.fill(PINK)
22      pixels.show()
23      time.sleep(0.5)
24      pixels.fill(OFF)
25      pixels.show()
26      time.sleep(0.5)