# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
# SPDX-License-Identifier: MIT
"""CircuitPython status NeoPixel red, green, blue example."""
import time
import board
import neopixel
pixel = neopixel.NeoPixel(board.NEOPIXEL, 1)
pixel.brightness = 0.3
while True:
pixel.fill((255, 0, 0))
time.sleep(0.5)
pixel.fill((0, 255, 0))
time.sleep(0.5)
pixel.fill((0, 0, 255))
time.sleep(0.5)
The built-in NeoPixel begins blinking red, then green, then blue, and repeats!
First you import two modules, time and board , and one library, neopixel . This
makes these modules and libraries available for use in your code. The first two are
modules built-in to CircuitPython, so you don't need to download anything to use
©Adafruit Industries Page 139 of 263