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
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

Environmental monitoring system project overview


Before digging into the code details and implementing the project using Android Things, it is useful to have an overview of the project. The target of this project is building an environmental monitoring system that detects:

  • Temperature
  • Pressure

The interesting aspect of this project, other than the data acquired using sensors, is that the Android Things app will visualize this information using LEDs. In other words, we will implement an app that somehow reacts to the environment properties implementing a custom logic and it is able to control other peripherals.

The following figure shows how the project will work:

This project uses an RGB LED to represent the current pressure condition. The RGB LED will have three different colors:

  • Yellow: Stable condition. The pressure is over 1022 millibar.
  • Green: Cloudy. The pressure is between around 1000 millibar and 1021 millibar.
  • Blue: Chance of rain. The pressure is under 1000 millibar.

There is another red...