Multiplexed color LEDs

The next example in this chapter demonstrates that some seemingly simple hardware can produce some impressive results if controlled with software. For this, we will go back to using RGB LEDs. We will use five RGB LEDs that are wired so that we only need to use eight GPIO pins to control their red, green, and blue elements using a method called hardware multiplexing (see the Hardware multiplexing subsection in the There's more... section of this recipe).

Get Raspberry Pi 3 Cookbook for Python Programmers - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.