Chapter 8. Interfacing with External Devices

In this chapter, we will work through the process of interfacing with a new device. We will cover the following topics:

  • Reading datasheets
  • I2C sensor memory registers
  • Accelerometer basics
  • Accelerometer interrupt functions
  • Writing Python libraries for external devices
  • Tap detection as input


Accelerometers, made abundant and affordable by the cell phone industry, are one of the most common sensors found in embedded devices these days. As their name implies, accelerometers sense acceleration, in one, two, or three axes. This is useful for things, such as pedometers, as you can sense the vibrations from a footstep, and they can also be used for sensing orientation by measuring the acceleration due ...

Get Learning BeagleBone Python Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.