Serial on Android using the audio port.

Get it in the Store!

The Android platform is extremely powerful -- we've been running robots and logging systems based on it for over a year now, so we should know!

While our software and source code is available on this very wiki, we'd like to offer to the community a code snippet and a schematic that can be used to let your Android phone control any microcontroller (and from there you can move servos, motors, or whatever else) without the need to root the phone. You get 24000BPS (that's 24 thousand, not 24 hundred), which is decent (if your microcontroller or device can only do standard baud rates, you may be limited to 19200bps or 9600BPS) and since the headphones output is stereo on most phones, you actually get two serial ports! This is only for transmission right now, however. The inspiration is of course Flake Labs ( Fun, Learning, and Killer Electronics. ) although we've moved all the logic to software in order to make the hardware as simple as possible.

You will want to adjust the potentiometer depending on what phone and microcontroller you're using, especially at higher baud rates: in general, it should be barely above zero volts -- some phones give a bit of a bias to their headphone outputs, so make sure to stay above that.

The software is available on the Google Play Store

We recommend using the Picaxe microcontroller as a slave device, as it is very cheap, easy to program (no programmer required, just two resistors and a serial cable) and very tough electrically.

Don't forget that we also sell a kit!

Page last modified on April 07, 2020, at 03:09 PM
Powered by PmWiki