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
 6import board
 7from adafruit_neopxl8 import NeoPxl8
 8
 9# Customize for your strands here
10num_strands = 8
11strand_length = 30
12first_led_pin = board.NEOPIXEL0
13
14num_pixels = num_strands * strand_length
15
16# Make the object to control the pixels
17pixels = NeoPxl8(
18    first_led_pin,
19    num_pixels,
20    num_strands=num_strands,
21    auto_write=False,
22    brightness=1.00,
23)
24
25while True:
26    for i in range(num_pixels):
27        pixels[i] = 0x00_01_00
28        pixels[i - 8] = 0x00_00_00
29        pixels.show()
30        time.sleep(1e-3)