code.py
1 # SPDX-FileCopyrightText: 2019 Kattni Rembor for Adafruit Industries 2 # 3 # SPDX-License-Identifier: MIT 4 5 """Simple rainbow example for 30-pixel NeoPixel strip""" 6 import digitalio 7 import board 8 from rainbowio import colorwheel 9 import neopixel 10 11 NUM_PIXELS = 30 # NeoPixel strip length (in pixels) 12 13 enable = digitalio.DigitalInOut(board.D10) 14 enable.direction = digitalio.Direction.OUTPUT 15 enable.value = True 16 17 strip = neopixel.NeoPixel(board.D5, NUM_PIXELS, brightness=1) 18 19 while True: 20 for i in range(255): 21 strip.fill((colorwheel(i)))