android.geek.nz

Making things do stuff

Page 3 of 3

Android Tings <3

Android Things PCF8574 and HD44780

The next step is to get some sort of display onto the Android Things Raspberry Pi. I have a drawer full of LCD modules, based on the HD44780, that I have used before with the PCF8574 I2C IO port expander.

The Android Things preview image has java support for I2cDevice. Writing a driver for the PCF8574 was a matter of porting some code from my old AVR library.

Code to follow…

Hello Ting ting

Task

Get Android Things running on the Raspberry Pi and run a hello world app from Android Studio.

Step 1 – Find a Raspberry Pi

Where are all my bloody Raspberry Pi’s? Oh yeah, One’s running Kodi, one’s a NAS, one’s … OK then, off to PBTech for a new Raspberry Pi. One quick trip into town the weekend before Christmas, no problem (Yay motorcycle ownership).

Step 2 – write the Image to SD card

The PBTech Raspberry Pi kit comes with an SD card, power supply, case and Raspberry Pi 3. Writing the SD card is the usual ‘dd’ affair.  Get the image and follow these instructions.

Step 3 – Connect it up

OK, USB for power. Can I use USB for adb too, nope on the Raspberry Pi it’s power only. OK, following instructions, “Connect to Ethernet.” Where’s that 30 meter Ethernet cable that reaches to the router.

Step 4 – Hello world app

Following instructions again. A single Activity that lists GPIOs will do for a start.

Result: Hello World on Raspberry Pi with Android Tings (Things) preview image.

Complexity: one third candy cane.

Newer posts »

© 2024 android.geek.nz

Theme by Anders NorenUp ↑