In this chapter, we introduced you to the I2C bus. You constructed a circuit that connected an I2C FRAM breakout board to the BBB, and then you did some basic testing on the circuit using i2cdetect
from i2c-tools
to ensure that the circuit was constructed properly and the kernel is able to interact with the circuit via the filesystem. You also learned about the portions of the PacktHAL init.{ro.hardware}.rc
file and Device Tree overlay that are responsible for configuring and making the I2C bus and I2C device drivers available for your app's use. The fram
app in this chapter demonstrated how to use the AsyncTask
class to perform time-intensive hardware interfacing tasks without stalling the app's UI thread and triggering the ANR dialog.
In the next chapter, you will learn about the high-speed serial peripheral interface (SPI) bus and use it to interface with an environmental sensor.