Chapter 4. PWM and ADC Subsystems

In this chapter, we will take a look at the pulse width modulation (PWM) and analog-to-digital converter (ADC) subsystems. We will cover the following topics:

  • Fading an LED
  • Controlling servo motors
  • Voltage dividers
  • Voltage followers
  • Sensing light levels with a photocell
  • Sensing distance with Sharp IR rangefinders
  • Building a simple robot

PWM

The BeagleBone's PWM subsystem contains three enhanced PWM (ePWM) modules and one enhanced capture (eCAP) module, all of which have their own two outputs, for a total of up to eight PWM outputs (refer to Appendix A, The BeagleBone Black Pinout to see which pins support PWM). We briefly covered what PWM is in Chapter 1, Before We Begin, but let's look at it in a bit more detail before ...

Get Learning BeagleBone Python Programming 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.