timer-bar/examples/neopixel-rainbow.py

17 lines
346 B
Python

import time
import board
import digitalio
import neopixel
from adafruit_led_animation.animation.rainbow import Rainbow
pixel_pin = board.GP28
num_pixels = 1
brightness = 0.2
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=brightness, auto_write=False)
rainbow = Rainbow(pixels, 0.01, period=10)
while True:
rainbow.animate()