The Internet of Things (IoT) using Raspberry Pi & Android things

November 10, 2018 | 10:00am
The Internet of Things using Raspberry Pi and Android things

Raspbian is a free operating system based on Debian optimized for the Raspberry Pi hardware. An operating system is the set of basic programs and utilities that make your Raspberry Pi run. However, Raspbian provides more than a pure OS: it comes with over 35,000 packages, pre-compiled software bundled in a nice format for easy installation on your Raspberry Pi.

The initial build of over 35,000 Raspbian packages, optimized for best performance on the Raspberry Pi, was completed in June of 2012. However, Raspbian is still under active development with an emphasis on improving the stability and performance of as many Debian packages as possible.

FreeRTOS -

Developed in partnership with the world's leading chip companies over a 15 year period, the FreeRTOS kernel is a market-leading real-time operating system (or RTOS), and the de-facto standard solution for microcontrollers and small microprocessors. With millions of deployments in all market sectors, blue-chip companies trust FreeRTOS because it is professionally developed, strictly quality controlled, robust, supported, free to use in commercial products without a requirement to expose proprietary source code, and its IP is carefully managed.

Linux -
What is Linux?

Just like Windows XP, Windows 7, Windows 8, and Mac OS X, Linux is an operating system. An operating system is a software that manages all of the hardware resources associated with your desktop or laptop. To put it simply – the operating system manages the communication between your software and your hardware. Without the operating system (often referred to as the “OS”), the software wouldn’t function.

The OS is comprised of a number of pieces:

The Bootloader:The software that manages the boot process of your computer. For most users, this will simply be a splash screen that pops up and eventually goes away to boot into the operating system.

The kernel:This is the one piece of the whole that is actually called “Linux”. The kernel is the core of the system and manages the CPU, memory, and peripheral devices. The kernel is the “lowest” level of the OS.

The Shell: You’ve probably heard mention of the Linux command line. This is the shell – a command process that allows you to control the computer via commands typed into a text interface. This is what, at one time, scared people away from Linux the most (assuming they had to learn a seemingly archaic command line structure to make Linux work). This is no longer the case. With modern desktop Linux, there is no need to ever touch the command line.

Graphical Server:This is the sub-system that displays the graphics on your monitor. It is commonly referred to as the X server or just “X”.

Desktop Environment:This is the piece of the puzzle that the users actually interact with. There are many desktop environments to choose from (Unity, GNOME, Cinnamon, Enlightenment, KDE, XFCE, etc). Each desktop environment includes built-in applications (such as file managers, configuration tools, web browsers, games, etc).

Applications: Desktop environments do not offer the full array of apps. Just like Windows and Mac, Linux offers thousands upon thousands of high-quality software titles that can be easily found and installed. Most modern Linux distributions (more on this in a moment) include App Store-like tools that centralize and simplify application installation. For example, Ubuntu Linux has the Ubuntu Software Center (Figure 1) which allows you to quickly search among the thousands of apps and install them from one centralized location.

Android things

Android Things supports three boards: the Intel Edison, the NXP Pico i.MX6UL and the Raspberry Pi 3. Support is coming for the Intel Joule and the NXP Argon i.MX6UL. The first thing you will notice is that these boards use a mixture of Intel and ARM-based CPUs and that both 32-bits and 64-bits are supported. The minimum amount of RAM is 512MB and all the boards support Wi-Fi and Bluetooth.

Android uses the Linux kernel at its core and Linux is a full multi-tasking operating system with virtual memory support. This means that Android Things needs a processor that supports virtual memory, in other words, a processor with a full MMU. For ARM processors this means something from the Cortex-A range and not a microcontroller from the Cortex-M range. The reason I mention this is that there are lots of IoT products that use microcontrollers and therefore have less memory, less flash storage, use less power, and use less complex operating systems. By opting to use Android and Linux then Google aiming at a particular segment of the IoT market and is automatically excluding itself from the other segments. Whether this is the right decision remains to be seen.

Raspberry Pi

Raspberry Pi is a computer designed by a British charity called the Raspberry Pi Foundation. It is designed to be as cheap as possible so that many people can afford it and so that it can be available in classrooms. It is also very small – around the same size as a credit card.

The Raspberry Pi Foundation tries to make sure that pupils in classrooms around the world have access to a computer so they can learn how to code and program it. The computer is designed to do many of the same things as a full computer but is sold without a monitor, keyboard or mouse in order to keep the price low. However it has USB slots which allow keyboards to be plugged in, and an HDMI port to plug into a TV or monitor. It doesn’t have a hard drive but instead saves files onto an SD card, as you would find in a digital camera.

iMX7

The i.MX 7 series offers a highly integrated multi-market applications processor designed to enable secure and portable applications within the Internet of Things.

ESP32

ESP32 is a series of low-cost, low-power system on a chip microcontroller with integrated Wi-Fi and dual-mode Bluetooth. The ESP32 series employs a Tensilica Xtensa LX6 microprocessor in both dual-core and single-core variations and includes inbuilt antenna switches, RF balun, power amplifier, a low-noise receive amplifier, filters, and power-management modules. ESP32 is created and developed by Espressif Systems, a Shanghai-based Chinese company, and is manufactured by TSMC using their 40 nm process.[2] It is a successor to the ESP8266 microcontroller.