Cellbots started as a single Python file, but has grown into a significant libray to support multiple communication methods and a variety of robot platforms. The use of Python on Android is possible thanks to the Scripting Layer 4 Android, an open source project that allows scripting languages such as Python, Lua, PHP, Perl, and others to work on your phone. While this doesn’t support rich UI’s like Android primary Java language does, you can whip up some new code quickly and experiment with robotics.
With the Cellbots Python library, you can run your phone as a remote control or as the robot’s onboard brain. Commands can be sent via Google Talk as chat messages (XMPP), through Telnet, voice recognition, over HTTP using the local network. The primary way for the phone to talk to the robot is using Bluetooth on any Android 2.0 and up phone, but methods for modding the phone to accept serial input can also be used.
The Python codebase currently supports talking to Arduino robots like Truckbot and Tankbot, the VEX Pro, and iRobot Create & Roomba. We’re working to add support for LEGO MINDSTORMS and you should be able to add your own by working from the source code. We’ve currently scoped the project for two-wheel differential drive robots and look forward to ideas on extending that to more complex types in the future.
To get started, install the Scripting Layer 4 Android on your phone. Then check out the Python source code and copy it to the phone at /sdcard/sl4a/scripts/cellbot/ and edit the config files to your liking. Then pair with your phone and launch cellbot.py to get started as a remote control or direct drive of the robot.
Whether you have one or two Android phones, we’re sure you’ll find new and clever ways to script up clever robot hacks in just a couple lines of Python!