If you cannot get your APA102 to light up or if you find that random LEDs are not turning on or off or they are displaying unexpected colors or random flickers, try the following:
- The APA102 needs 5-volt logic: Make sure you are using a logic level converter and that is connected the correct way around—HV to 5 volts and LV to 3.3 volts.
- Ensure that the DI/CI side of the APA102 is connected to the logic level converter.
- Make sure your power source can supply enough current. As an example, under-supply of current or voltage can make white look more like red.
- Make sure the ground of your power supply is connected to a ground pin on your Raspberry Pi.
- If you are using big banging, move to hardware SPI.
- If using the hardware SPI (that is, creating an instance of the spi() class), try the following:
- If you are receiving the error SPI device not found, make sure SPI has been enabled in the Raspbian OS. We covered this in Chapter 1, Setting Up Your...