Getting Started with Android things, Lesson 0 : Rainbow Hat

I received an Android Thing kit when I went to Google I/O and I decided to try a few things with it. A bit of background information, I have a lot of experience on Android but I have really not played with electronics since middle school. So this should be an interesting learning process…

What I am trying to achieve

I am just trying to have fun with Android things, blink a few LED, control a motor, maybe a step motor, then when I feel comfortable enough, I will try to build something a bit more elaborate like a 2d plotter.

The steps I am going to take

First step I will gather a bit of hardware. I already have a Android Thing kit with the Rainbow Hat. So the first story will be about writing a simple application to control the Rainbow Hat.

I also ordered from Massdrop the SunFounder Super kit v3.0 for Raspberry PI. (see link bellow)

I feel this is a good little starter kit. As I really have no electrical components on hand, I just need a few Leds, buttons, motor, LCD screen, cables etc… and I don’t really want to go through the trouble of buying things individually. Also, and more importantly, this kit comes with a little manual that has a series of 17 lessons.

Those 17 lessons are written in Python for the Rapsberry PI. As I go through them, I will document here the steps to use Kotlin and the Android Thing Kit instead.

Lesson 0 : Rainbow Hat

To get started with the Android Thing Kit, I installed the Android Thing app on my phone and went through the tutorial to assemble the cardboard and all the parts from the kit.

You can find the steps here :

Here is how mine look:

My Android Thing kit assembled.

I had to update the device with the latest firmware and I had a small issue with the usb cable because my laptop (MacBook Pro) does not provide enough power for the Android Thing Kit. It would do a boot loop and would never finish loading. Just using a USB HUB did the trick. This was a pretty smooth process for the hardware and for the software.

Android Thing Test 0 (ATT0) project:

I followed a simple tutorial to get started with the Rainbow hat. Just to try to turn on the Leds, detect button presses, control the led strip, the LCD screen, play an annoying buzzer sound, and retrieve the temperature.

You can find the source code here: https://github.com/otiasj/AndroidThings/tree/master/ATT1/

Not much to see, accessing the RainbowHat driver is as easy as importing an Android library (The Rainbow Hat Driver). And so I will not spend more time on the Rainbow Hat.

I am ready to remove the Rainbow hat and use a breadboard instead, I want to plug cables, resistors and LEDs!

Next up Lesson 1 from the Kit : “Blinking Led”

--

--