It is the cheapest, full-featured Android phone that I’ve found. Only $20 on Amazon NEW. It feels like finding hidden treasure because the only reason it’s so cheap is that the phone is targeted for the bottom market. And, normal people who buy the phone later add minutes to use it as a phone. But not us! If everyone did what we want to do with the phone, they’d lose money because there’s no way this package can be produced and sold for a profit at $20. So shhhh… let’s just keep this between you and me.
Here’s what you do after you get it:
- (optional) Root it. That link takes you to a super simple one-click script and all you need is a PC and the USB cable that came with the phone. I don’t know why I rooted mine, but it’s Android and you can, so why not? You could install this custom ROM too if you want (I didn’t). And if you screw something up like I did, you always go back to “stock” with this.
- Install SL4A — the Scripting Layer for Android. This lets you interface with Android and everything your phone’s hardware allows… from a Python script.
* Install the APK
* Menu > view > interpreters
* Menu > add > Python
* Install the Python APK > OPEN the Python app > Install Python (+ whatever modules you want, like pySerial + pyBluez)
- In SL4A, go to Menu > view > interpreters > Menu > start server
(Note the IP address and port, e.g. 192.168.1.3:12345)
- From your PC, write a simple Python script called hello.py to talk to the server on your phone:
12345import androiddroid = android.Android((192.168.1.3, 12345))droid.ttsSpeak("hello world")
- Notice the “import android” above. That’s from here. Download android.py and put it next to hello.py above.
- python hello.py
The hardware isn’t great and it’s still on Gingerbread, but I’m pretty sure it’s still more powerful than NASA’s Lunar Lander. It’s just a steal at $20 for the nice package. Battery life is super and everything works fine. It even has an external micro SD slot! Oh one thing you might want to upgrade for our example above is the Text-to-Speech voice. Gingerbread is old so you don’t get Google’s latest TTS software. So I downloaded IVONA. It’s free, it works for Gingerbread and I like Amy’s UK English voice.
By the way, the SL4A website taught me that I’m not the first brilliant person to think of using smartphones for robots. And, the term for robots that use smartphones is Cellbots. But it still makes me wonder why people still want to mess with things like a $30 XBee WiFi module. Especially when phones like the Optimus Dynamic gives you WiFi (plus everything else) for $20. Who knows.