In this series of blog posts I will talk you through my adventures in my ‘lab’. I have created a so called Magic Mirror, out of some tutorials on the web. These tutorials are really awesome and you have a great mirror running in no time. It has some cool features, like displaying weather info, your appointments out of your google calendar. Some news-items from your own favorite news provider (in my case nu.nl), and you can even let it tell you that you look awesome today!
I really want to add 3D capabilities to this Magic Mirror. As some of you maybe know, I have a background in Adobe (or for non-millennials: Macromedia) Flash programming. I have also written 3D applications in Flash, so that would have been the ‘easy pick’. I have written some code in Adobe AIR and I know how to compile this code into Android or iOS applications. So I thought that this knowledge might be something I needed to get this 3D-thing working on the Raspberry Pi. I was wrong!! Pi does not have support for AIR. It apparently does not have Android capabilities whatsoever. So, now what?
I recently deep dived in to the world of Unity (also with a great tutorial on Pluralsight). This is a very easy way of creating 3D games or applications, based on cool 3D modelling in for example 3D studio Max or Blender. Actually that is what I really want to do on the Raspberry Pi: Displaying 3D models. But you need some extra hardware powered graphical support for that. DirectX/Direct3D/WebGL, those kind of techniques are needed. And the raspberry Pi, with the standard Raspbian OS doesn’t have this off-the-shelve. In Unity 5, I have tried to export the game I created with the tutorial to Linux (and than send it to Raspberry Pi), but tis Linux export is only for i86 processors (Raspberry Pi has a ARM processor), so I got out of luck there.
So here I am; No CPU that supports 3D, no hardware acceleration from my GPU, and no knowledge I can use to build something 3D. Then suddenly the sky opens up. I hear that Google is also developing an OS for IoT-devices. This OS is based on Android, and it is called Things. That sounds very promising! The device might even use the same hardware graphic acceleration as recent smartphones do. Or I could even export my 3D game right out of Unity! It was worth a try, so I looked on the Android Things developer website and downloaded the 0.2 version image. I flashed my raspberry Pi with the new OS and gave it a try. It works!
So, now I need to hook it up to my laptop, and see if I can get some app running on it. First try to connect it to the internet. I first tried to just run it (without ethernet cable) and that didn’t work. Than hooked it up with ethernet cable and got adb connection working. I would like to get rid of the ethernet cable asap, so I tried to follow the steps on the website. It didn’t work out the first time. Than I restarted the device, and did the adb commands again: It says it works, and a few lines later it says it doesn’t work anymore:
I am gonna look into this, because I still want to see a 3D rendered model running on this Raspberry Pi!! I will keep you posted.
<edit> I got it working. It now has Wifi enabled on the device, so I am ready to show some content. Let’s see how we can get this 3D going on Raspberry!