The quick and simple guide to Android Things.
If you’re interested in IoT then keep reading, cos sh*ts about to get real.
Just under two weeks ago, Google dropped the mic and announced Android Things.
This is a quick and simple guide outlining the key things you need to know about the OS, along with a simple project that demonstrates connecting to the internet to retrieve and display live weather data on a Raspberry Pi 3.
What is Android Things?
This is Google’s new IoT platform and formal entry into the IoT space, grown out of Project Brillo.
What is the difference between Android Things and standard Android?
The Android Things OS is still Android at its heart, and takes advantage of the same Android development tools that are used to create Android apps, however the OS has been simplified and removes redundant APIs that may not be useful to IoT applications. Things like AdMob, Maps, Android Pay, Sign-In and Notifications are unavailable.
What does this mean?
Android Developers are likely to be leading the charge in IoT development for 2017 (or until a better platform emerges). Android developers should aim to skill up in their hardware knowledge to really tame the beast that is IoT.
Is it secure?
Android Things will support automatic OTA (Over The Air) updates directly from Google, making updating simple and convenient. This also helps ensure security vulnerabilities are quickly patched, making Android Things infinitely better than current offerings when it comes to security.
What is Weave?
Weave is a communications platform developed by Nest Labs (now owned by Google). It aims to provide a common protocol to OEM manufacturers in connecting to Google cloud services to provide secure device registration, storing of states, and integration with Google services like the Google Assistant. The Android Things OS will support Weave in the coming future. Manufacturers are already integrating Weave into their products.
What hardware does Android Things run on?
The Android Things operating system is designed to run on embedded computers built on a single circuit board; things like the Raspberry Pi, Intel Edison’s and the like. A list of currently supported hardware can be found here.
What is the new Peripheral I/O API?
The new Peripheral I/O API offloads most of the low-level hardware implementation to a library, making it easy to communicate with the input/output ports of your connected hardware. GPIO, PWM and various Serial Communication protocols are currently supported.
What are User-Space Drivers?
In comparison to the Peripheral I/O API which allows you to communicate directly with your hardware, User-Space Drivers allow you to register new device drivers and extend them onto the Android Framework. This allows you to easily inject your hardware events into the standard Android APIs, useful for integrating things like GPS, HID events or sensors.
What is GPIO (General Purpose Input/Output)?
Simple hardware components tend to operate using either High or Low to set their state. Using the bundled GPIO Driver, you can easily control attached GPIO components.
What is PWM (Pulse Width Modulation)?
Unlike GPIO, PWM provides more fine-grain control in what you can send to a component; things like servo’s work in this way. A Pulse is a digital square wave that can oscillate to a given frequency and duty cycle.
Serial Communication (I2C, SPI and UART)?
Serial communication tends to be used when a larger payload is required. Digital data is passed to and from a component either synchronously or asynchronously and in full or half duplex depending on the protocol used.
Raspberry Pi 3 Pin Layout
Most of the pins are for GPIO, with some pins specially designated for secondary functions, i.e. serial communication or PWM output.
What basic circuit theory is good to know?
Google have very handily created a Hardware 101 overview on useful theory to know to aid you on your IoT adventures. Find it here.
What is a Rainbow HAT (Hardware Attached on Top)?
HAT’s are pre-built boards that can be attached directly onto a Raspberry Pi. The guys over at Pimoroni have worked with Google in creating a very fun little HAT to help get developers tinkering. The HAT features an Alphanumeric display, several multicoloured LED’s amongst a few other things. Find it here. You can also check out it’s pin layout here.
This more or less sums up my journey with Android Things. I’m excited to see Google taking IoT seriously and look forward to hearing more about commercial products being built with Android Things!
Moj is an Android Developer from London, currently creating awesome apps over at The App Business.