Android Things and a KeDei 3.5" Display

Since a few days now I’m discovery the Android Things (IOT) platform. With my Android background and broad interest in IOT and embedded devices and development for these devices I thought that would be fun. The entire platform is still in developer preview. Actually when writing this article the developer preview 0.5.1 (August 24 2017) was the latest.

And so it was. I have a spare Raspberry PI 3 around here, so ideally as development board, I have lots of components to wire to the RPI on a breadboard and I have and HDMI cable to connect to any of my desktop monitors. And so the basic examples were all fine. But suddenly I was thinking that I wouldn’t want a big desktop monitor as output device, but just a small screen (about the size of the RPI) would be a better fit. So I looked around on AliExpress and came up with a 3.5" KeDei touchscreen. Quickly ordered it and waited for it to be delivered just today.

But that was a bummer, I quickly connected the display on the board, the display turned on, and then just a black screen… It has costed me literally hours (8PM until 1AM!) to figure out the problem.

I quickly figured out that I would have to configure the display in some boot/config.txt file. Let me start with that first. So you have created an SD card for the RPI and if you want to read that card on your Mac that just doesn’t work because of the EXT3 format. So luckily I had a Parallels 12 license around to quickly setup an Ubuntu station that can read the EXT3 format (and believe me, I had to do nothing for it, in just 5 minutes my Ubuntu was set up and launched for me). So for every configuration that I’ve tried I inserted the card and did the editing on the boot-partition of the config.txt file.

Correct config.txt configuration

I’ve tried many different configurations and not a single one did work for me… Until many hours later when I stumbled upon a post on StackOverflow:

The author of the question ends up giving the correct answer himself: downgrade to Android Things 0.4.1 (release of June 2017). I did try that and indeed it worked when I added the above configuration to the rest of the config.txt! It’s nothing more than an Android Things bug. Fair enough since it’s still in an early developer preview state. The image below is with the the 720x480 resolution. Seems to me that this will still be good enough for a touch screen. Up to the next Android Things adventure!