Circuit Python – Standard LED Code for Copy Purposes

Copy below (code will only show on desktop version):



import board 
import digitalio
import neopixel 

from adafruit_led_animation.animation.comet import Comet 
from adafruit_led_animation.color import RED

NUM_PIXELS = 30
NEOPIXEL_PIN = board.D5
POWER_PIN = board.D10
ONSWITCH_PIN = board.A1

enable = digitalio.DigitalInOut(POWER_PIN)
enable.direction = digitalio.Direction.OUTPUT
enable.value = True

strip = neopixel.NeoPixel(NEOPIXEL_PIN, NUM_PIXELS, brightness=0.3, auto_write=False)
strip.fill(0) 
strip.show()

comet = Comet(strip, speed=0.01, color=RED, tail_length=10, bounce=True)

while True: 
   comet.animate()

Shopping cart0
There are no products in the cart!
Continue shopping
0