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

Building the Arduino project

In this paragraph, we will implement the Arduino project. The first step is connecting the RGB LED strip to Arduino, as described in the following figure:

As you can see, the wiring is very simple. The WS2812 peripherals have only one data pin that is connected to the Arduino pin 5 (PWM).


Do not forget to connect the ground all together to have a common reference.

Now it is time to start developing the code. To handle the RGB LED strip we will use a library developed by Adafruit that makes it very easy to manage every RGB LED available on the strip. You can directly use the source code of this sketch and upload it into your Arduino Uno board, skipping all the following steps. You can find the source code once you have downloaded the book project source code. Anyway, it is useful to follow this guide step by step because it helps you to better understand how to implement the Android Things app.

Therefore, the first step is installing this library:

  1. Open Arduino IDE...