10
LED Fader Project
This is the first of three projects designed to make use of Python and the GPIO pins to control the color of light coming from an RGB LED. The project combines the use of the guizero library to create a user interface and the gpiozero libraries’ PWM feature to control the brightness of the three channels of the LED (red, green, and blue).
Figure 10-1 shows the LED hardware built onto breadboard and Figure 10-2 shows the user interface used to control it on your Raspberry Pi.
Figure 10-1 An RGB LED connected to a Raspberry Pi.
Figure 10-2 A guizero user interface for controlling the LED.
What You Need
To build this project, ...
Get Programming the Raspberry Pi, Third Edition: Getting Started with Python, 3rd 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.