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

Implementing the spying eye project in Android Things


It is time that we focused our attention on developing the project. Now we have all the information and the knowledge we need to build the Android Things app. This app can be divided into two different parts:

  • Control servomotor
  • Use camera in Android Things

In the first part, we describe, according to the information explained previously, how to control a servomotor while, in the second part, we will describe how to acquire images in Android Things using a camera. As you may remember, the servomotor is used in this project to rotate the camera so that we can explore a wider area. Moreover, this project has a UI that we can use to control the servo and take the picture. The user interface is very simple and intuitive; the result is shown in the following figure:

Basically, there are three buttons:

  • The left button is used to turn the camera to left rotating the servo
  • The right button is used to turn the camera to right rotating the servo
  • The button...