30 lines
1,003 B
Python
Executable file
30 lines
1,003 B
Python
Executable file
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
|
|
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
"""
|
|
This example blinks the LEDs purple at a 0.5 second interval.
|
|
|
|
For QT Py Haxpress and a NeoPixel strip. Update pixel_pin and pixel_num to match your wiring if
|
|
using a different board or form of NeoPixels.
|
|
|
|
This example will run on SAMD21 (M0) Express boards (such as Circuit Playground Express or QT Py
|
|
Haxpress), but not on SAMD21 non-Express boards (such as QT Py or Trinket).
|
|
"""
|
|
import board
|
|
import neopixel
|
|
|
|
from adafruit_led_animation.animation.blink import Blink
|
|
from adafruit_led_animation.color import PURPLE
|
|
|
|
# Update to match the pin connected to your NeoPixels
|
|
pixel_pin = board.A3
|
|
# Update to match the number of NeoPixels you have connected
|
|
pixel_num = 30
|
|
|
|
pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.5, auto_write=False)
|
|
|
|
blink = Blink(pixels, speed=0.5, color=PURPLE)
|
|
|
|
while True:
|
|
blink.animate()
|