O'Reilly logo

Programming the BeagleBone by Yogesh Chavan

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 9. UART, I2C, and SPI Programming

In the previous chapter, we went through some Python examples on BeagleBone. We covered digital components and analog I/O devices. There are some sensors/devices that do not fit into these types. They accept or produce more data than traditional sensors/devices. Communication with them has to be done via an I/O bus. In this chapter, we will study a few popular I/O bus communication protocols in the embedded world and how they are supported on BeagleBone. Then we will program sensors/devices that support these protocols.

This chapter will cover:

  • Bus and bus protocols
  • What is UART?
  • A program to read/write on UART
  • I²C protocol
  • Program to read from an ADXL345 sensor
  • SPI protocol
  • A program to write display text on ...

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