Skip to Content
Experimenting with Raspberry Pi
book

Experimenting with Raspberry Pi

by Warren W. Gay
November 2014
Beginner
248 pages
4h 40m
English
Apress
Content preview from Experimenting with Raspberry Pi

CHAPTER 9

image

Pulse-Width Modulation

This chapter explores pulse-width modulation (PWM) using the Raspberry Pi. PWM is applied in motor control, light dimming, and servo controls, to name a few examples. To keep the hardware simple and the software small enough to read, we’re going to apply PWM to driving an analog meter in this chapter.

While the CPU percent-busy calculation used here is a bit cheesy, it is simple and effective for our demonstration. The meter deflection will indicate how busy your Raspberry Pi’s CPU is. We’ll demonstrate this using a hardware and software PWM solution.

Introduction to PWM

The GPIO output signal is a digital signal ...

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

Adventures in Raspberry Pi, 2nd Edition

Adventures in Raspberry Pi, 2nd Edition

Carrie Anne Philbin
Learning Raspberry Pi

Learning Raspberry Pi

Samarth Shah, Serge Schneider

Publisher Resources

ISBN: 9781484207697Purchase book