Now that you have your circuit ready and our LED strip's expected current usage, let's configure and light up our LED strip:
- Edit the chapter08/apa102_led_strip.py file and look for the following line near the top of the file. Adjust the number to be the number of safe LEDs you calculated previously, or the number of LEDs on your strip if it had a suitably capable power supply:
NUM_LEDS = 60 # (2)
- Save your edits and run the code. If everything is connected correctly, you should observe the LEDs on the strip cycle through the colors red, green, and blue and then perform a few different light sequences.
If your LED strip is not working, check out the APA102 LED strip troubleshooting tips later in the section.
If your strip does not show red, green, and blue in that order, then you would need to adjust code to set the correct order—I'll show you where in the code you can adjust...