Simple test
Ensure your device works with this simple test.
examples/neopxl8_simpletest.py
1# SPDX-FileCopyrightText: 2022 Jeff Epler
2#
3# SPDX-License-Identifier: Unlicense
4
5import time
6
7import board
8
9from adafruit_neopxl8 import NeoPxl8
10
11# Customize for your strands here
12num_strands = 8
13strand_length = 30
14first_led_pin = board.NEOPIXEL0
15
16num_pixels = num_strands * strand_length
17
18# Make the object to control the pixels
19pixels = NeoPxl8(
20 first_led_pin,
21 num_pixels,
22 num_strands=num_strands,
23 auto_write=False,
24 brightness=1.00,
25)
26
27while True:
28 for i in range(num_pixels):
29 pixels[i] = 0x00_01_00
30 pixels[i - 8] = 0x00_00_00
31 pixels.show()
32 time.sleep(1e-3)