Adafruit ESP32-S3 Manual page 139

Tft feather
Table of Contents

Advertisement

# 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,
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
and
, and one library,
time
board
. This
neopixel
Page 139 of 263

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S3 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF