The APA102 is an addressable multi-color (RGB) LED that is controlled using a Serial Peripheral Interface (SPI). In simplistic terms, we send instructions to the LED asking it what color to display rather than individually controlling each of the three red-green-blue legs of the LED using PWM as we did in the previous example.
If you need a quick refresher on SPI, we covered it back in Chapter 5, Connecting Your Raspberry Pi to the Physical World. We will also discuss SPI further the context of the APA102, the Raspberry Pi, and Python after we explore APA102 specific code shortly.
APA102 LEDs can also be connected or chained together to create LED strips or LED matrices to create dynamic and multi-LED lighting and display solutions. Irrespective of how the LEDs are arranged, we control them using a common technique where we send multiple sets of instructions to a chain of APA102 LEDs. Each individual LED consumes...