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:
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...