Chapter 1, Introducing Android Things, goes over the big picture of Android Things, the vision behind the platform, and how it compares to other – in principle – similar ones, such as Arduino. Then we will explore the Dev Kit, how to install Android Things on them and how connect to the boards to deploy our code to them. Finally, we will create of a project for Android Things using Android Studio, see how it is structured, and what are the differences from a default Android project.
Chapter 2, The Rainbow HAT, explains how to use the Rainbow HAT to get started with interactions with hardware. This HAT (Hardware On Top) is a selection of components that you can plug into a Dev Kit in order to start working with them without the need for any wiring. We will learn how to use LED, buttons, read temperature and pressure from a sensor and display it on an LCD alphanumeric display, play around with an RGB LED strip, and even make a simple piano, all using high-level abstraction drivers.
In the next four chapters we will take a look at what is under the hood and we will start exploring the different protocols in depth.
Chapter 3, GPIO – Digital Input/Output, goes over General Purpose Input Output (GPIO), which is what we used for the buttons and LEDs. We will learn how to access them directly and then look at other sensors that use GPIO, such as proximity and smoke detectors, as well as other components that also interact via GPIO, such as relays, DC motor controllers, stepper motors, ultrasound proximity sensors, and a numeric LCD display.
Chapter 4, PWM – Buzzers, Servos, and Analog Output, focuses on Pulse Width Modulation (PWM) and its basic usages, of which we have already have seen the piezo buzzer. The most popular use of PWM is servo motors, so we will see how they work. Finally, we'll learn how to use PWM as an analog output.
Chapter 5, I2C – Communicating with Other Circuits, covers the Inter-Integrated Circuit (I2C ) protocol. We have already used it for the temperature/pressure sensor and the LCD alphanumeric display. I2C is the most widely used protocol for simple communication between circuits, and we will explore a few of them. One of the key ones is analog to digital converters (ADC), and we will see how we can use them to read from analog sensors. Other components include magnetometers, accelerometers and IMUs in general, as well as GPIO and PWM expansion boards.
Chapter 6, SPI – Faster Bidirectional Communication, is based on the last protocol we'll look into: Serial Parallel Interface (SPI). We have already used this protocol for the RGB LED strip, and in this chapter we will look at some other drivers, such as OLED displays and LED matrix.
Chapter 7, The Real Power of Android Things, explores some areas where Android Things really shines by using some libraries and services that enable us to make the most of our developer kit. Among the topics we will cover are the use of Android UI, making companion apps using a REST API, Firebase, and Nearby, and we will briefly explore other libraries, such as Tensorflow for machine learning.
Appendix, Pinouts diagrams and libraries, we go over the Pinout diagrams of Rasberry PI and NXP iMX7D. We will then go into details about the state of unsupported Android features and intents on Android Things 1.0, as well as the state of available and unavailable Google APIs on Android Things.