Added neopixel rainbow example
This commit is contained in:
parent
58e5c94d8a
commit
7097136a57
|
@ -0,0 +1,17 @@
|
|||
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()
|
Loading…
Reference in New Issue