Book Image

Android Things Projects

By : Francesco Azzola
Book Image

Android Things Projects

By: Francesco Azzola

Overview of this book

Android Things makes developing connected embedded devices easy by providing the same Android development tools, best-in-class Android framework, and Google APIs that make developers successful on mobile. With this book, you will be able to take advantage of the new Android framework APIs to securely build projects using low-level components such as sensors, resistors, capacitors, and display controllers. This book will teach you all you need to know about working with Android Things through practical projects based on home automation, robotics, IoT, and so on. We’ll teach you to make the most of the Android Things and build enticing projects such as a smart greenhouse that controls the climate and environment automatically. You’ll also create an alarm system, integrate Android Things with IoT cloud platforms, and more. By the end of this book, you will know everything about Android Things, and you’ll have built some very cool projects using the latest technology that is driving the adoption of IoT. You will also have primed your mindset so that you can use your knowledge for profitable, practical projects.
Table of Contents (15 chapters)
Title Page
About the Author
About the Reviewers
Customer Feedback

IoT components

There are several elements that contribute to creating the IoT ecosystem and it is important to understand the role they play in order to have a clear picture about IoT. This will be useful to better understand the projects we will build using Android Things. The basic brick of IoT is a smart object. It is a device that connects to the internet and it is capable of exchanging data. It can be a simple sensor that measures a quantity such as pressure, temperature, and so on, or a complex system. Extending this concept, our oven, our coffee machine, and even our washing machine are all examples of smart objects once they connect to the internet. All of these smart objects contribute to developing the internet of things network. Anyway, it's not only household appliances that are examples of smart objects, but also cars, buildings, actuators, and so on. We can reference these objects, when connected, using a unique identifier and start talking to them.

At the low level, these devices exchange data using a network layer. The most important and known protocols at the base of Internet of things are:

  • Wi-Fi
  • Bluetooth
  • Zigbee
  • Cellular network
  • NB-IoT
  • LoRA

From an application point of view, there are several application protocols widely used in the internet of things. Some protocols derive from different contexts (such as the web); others are IoT-specific. To name a few of them, we can remember:

  • HTTP
  • MQTT
  • CoAP
  • AMQP
  • Rest
  • XMPP
  • Stomp

By now, they could be just names or empty boxes, but throughout this book we will explore how to use these protocols with Android Things.

Prototyping boards play an important role in the Internet of things and they help to develop the number of connected objects. Using prototyping boards, we can experiment with IoT projects and in this book, we will explore how to build and test IoT projects using boards compatible with Android Things. As you may already know, there are several prototyping boards available on the market, each one having specific features. Just to name a few of them, we can list:

  • Arduino (in different flavors)
  • Raspberry Pi (in different flavors)
  • Intel Edison
  • ESP8266
  • NXP

We will focus our attention on Raspberry Pi 3 and Intel Edison because Android Things officially supports these two boards. During the books, we will also use other development boards so that you can understand how to integrate them.