neopxl8_simpletest.py
1 # SPDX-FileCopyrightText: 2022 Jeff Epler 2 # 3 # SPDX-License-Identifier: Unlicense 4 5 import time 6 import board 7 from adafruit_neopxl8 import NeoPxl8 8 9 # Customize for your strands here 10 num_strands = 8 11 strand_length = 30 12 first_led_pin = board.NEOPIXEL0 13 14 num_pixels = num_strands * strand_length 15 16 # Make the object to control the pixels 17 pixels = NeoPxl8( 18 first_led_pin, 19 num_pixels, 20 num_strands=num_strands, 21 auto_write=False, 22 brightness=1.00, 23 ) 24 25 while 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)