Skip to Content
Programming the Raspberry Pi, Third Edition: Getting Started with Python, 3rd Edition
book

Programming the Raspberry Pi, Third Edition: Getting Started with Python, 3rd Edition

by Simon Monk
June 2021
Beginner
208 pages
3h 50m
English
McGraw-Hill Education TAB
Content preview from Programming the Raspberry Pi, Third Edition: Getting Started with Python, 3rd Edition

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.

Images

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, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Raspberry Pi 3 Cookbook for Python Programmers - Third Edition

Raspberry Pi 3 Cookbook for Python Programmers - Third Edition

Steven Lawrence Fernandes, Tim Cox
Getting Started With Arduino, 4th Edition

Getting Started With Arduino, 4th Edition

Massimo Banzi, Michael Shiloh

Publisher Resources

ISBN: 9781264257362