Leveraging AndroidThings and Arduino to build Smart Homes and Self-driving Cars.

Mercy Aboh
3 min readMar 18, 2019

With all the excitement surrounding programming, more often than not, it seems like all of its solutions are software and not tangible.

Introducing, AndroidThings and Arduino micro-controllers!👏

With AndroidThings and Arduino Micro-Controllers, developers(or non-developers) can easily write code for hardware and see the code in physical action! Exciting, right?! The excitement of being able to achieve this led us to organize a meetup on these two amazing hardware. The aim of the meetup was to show the possibilities of building with IoT devices and considering their applications in day-to-day life activities. We focused on two separate devices; the AndroidThings Starter kit, which can be used to build Temperature and Pressure sensors for smart homes and an Arduino board that we used to build a 4-wheel robotic car.

The meetup was kick-started by Mercy talking about smart homes. She began by giving her background in Architecture and how her flare for robotics lead her to design a Smart Children’s Centre building as her final undergraduate project. Highlighting current issues happening in Nigeria regarding building collapse, Mercy admonished that having smart homes has not only become a luxury but a necessity.

Mercy discussing building Smart Homes

The participants got to see the temperature and pressure sensor data generated by the RainbowHAT peripheral of the AndroidThings starter kit via a WeatherStation App built by her. The real-time temperature data was displayed on the screen while for the pressure, in the Logcat window on Android Studio. Mercy further explained that the data from the sensors can be sent to be analyzed on Cloud IoT Core.

AndroidThings Starter Kit
Temperature data displayed on RainbowHAT

https://drive.google.com/file/d/1eTBy-cj0kDgvoA-1SrA_OXDq_5AEZ0Q_/view?usp=sharing

Hafeez came on next to discuss programming with the Arduino micro-controllers, his first point was the Tesla(of course!). The ability to program the 4 wheels of the robotic car to work with the Ultrasonic sensor to change directions whenever an obstacle is in sight is basically like building a Tesla(right?👀). Having said that, Hafeez explained the process of coupling the 3 Boards; the H-Bridge, Arduino UNO and Sensor Shield

Hafeez discussing the 4-Wheel Drive
H-bridge board configure

After coupling the boards, Hafeez went on to explain the configuration of the pins that connect the boards and the Arduino Sketch to program each function. Next up was actual writing of code(yay!), the Arduino sketch had 2 major objects; the 4 wheels and the ultrasonic sensor. After explaining each part of the code and what each object does, it was time to see the code in action! After compiling the sketch and uploading it onto the board, the robotic car was powered with 2 Lithium Ion batteries.

https://drive.google.com/open?id=1npSurUian4UnqbZ4pmiqrpYXWJVsOikP

The meetup was concluded with exciting questions from participants and answers from the organizers. Next up, we look forward to seeing more smart buildings across Nigeria and setting up a delivery service with self-driving robotic cars, watch out FRSC!

All thanks to Nnamdi, Robert John and CoLab for the support towards the success of the meetup.

Find the links to the slides here: https://drive.google.com/open?id=1dlxuzjFDg5SeNgkqn4bAL2Fo4QAhUw3I and https://docs.google.com/presentation/d/1RLAVJ3me7HFxwD_n0TMhyMLZ0aGPnU-B78cdNDdA_tY/edit?usp=sharing

Find the link to the GitHub repo here: https://github.com/mistaOba/GCKaduna-IOT

--

--