Bluetooth communications for Android devices via Processing

[Oscar] shows us how to use a Processing sketch for Android to communicate with Bluetooth devices (translated). It turns out this is easier than you might think. Processing and Android are both closely related to Java, and you can just import the Android libraries that deal with Bluetooth within the Processing sketch. That makes it easy to enable the Bluetooth modem when the sketch is launched, and manages connecting with devices as well as sending and receiving data.

For this example [Oscar] is using an Arduino with a Bluetooth module as a test device. His sketch first shows what devices are available, then connects to the one you select from the list. The 11 lines of Arduino code transmit a value via the serial port, and listens back for a command to toggle the LED on pin 13. [Oscar] takes time in his tutorial to show us how each step of the Processing sketch is assembled, instead of only posting the finished code.

[Thanks Sara]

Comments

  1. MobileWill says:

    This will be good for some Robot fun.

  2. fronzbot says:

    Yeah, Arduino/Android communication is ridiculously easy. Built an Android controlled Quadcopter over the summer actually!

  3. Gördi says:

    Can Someone tell me how fast the Communication can be?
    I am thinking about a Motorbike-Computer with Hardware like Arduino and a Android phone as Display.

  4. Drake says:

    I can see a prank brewing. Automatically connect to a playstation while playing games online. Then transmit banana phone over and over again.

  5. Here’s my attempt to interface a a bluetooth module with the arduino.

    http://murlidharshenoy.wordpress.com/2011/10/26/adding-bluetooth-to-your-microcontroller-projects/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,441 other followers