O'Reilly logo

GNU/Linux Rapid Embedded Programming by Rodolfo Giometti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 18. Pulse-Width Modulation - PWM

Using the pulse-width modulation (PWM) technique, we can encode a message into a pulsing signal (usually a square waveform) to generate an analog signal using a digital source as a microcontroller. Then, these messages can be used to control the power supplied to electrical motors or other electronics devices or, as we're going to show into this chapter, to control the position of a servo motor.

Using a few Bash commands, we'll see how an embedded developer can use PWM signal generators, available in GNU/Linux systems, to set a specific axis position of a servo motor.

What is a PWM device?

A PWM generator is a device that can generate a PWM signal according to its internal settings. The output of a PWM generator ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required