Not sure if you’re still looking for a way to get data on android from arduino via bluetooth but I recently endeavored to do and have some working examples.
First and foremost, check out the ketai library for processing: https://code.google.com/p/ketai/
Second and almost more importantly, check out the android processing project: http://wiki.processing.org/w/Android
You can now compile Processing sketches into android.apk’s
(i presume you have Processing installed, if not, do so and play around with it)
then this blog covers some code that works with a couple changes (see below)
#include <softwareserial .h="">
didn’t work for me. i had to change this to:
SoftwareSerial mySerial(10, 7); // RX, TX
I have my BT chip tx/rx pins coming into 0 and 1 on my arduino.
SoftwareSerial mySerial(0, 1); // RX, TX
Other than those two things, everything else works. Installed the arduino sketch onto arduino.
Then ran the processing code, it compiled into an apk and installed & then ran on my phone.
note: im using this BT, JY-MCU v1.06. got it for $10 on amazon.
note2: notice the tx from the BT goes to RX on the arduino and viceversa.
note3: it will take a number of hours to:
- download processing + get familiar.
installing the android sdk, take the time to do this properly, check your API levels to make sure it’ll run on your device
- reading up on android + processing
- I recommend the book: Rapid Android Developement as it goes over the Ketai library in depth
- figuring out how to get all the processing libraries in the right place, ok this isnt too hard…
have fun and hope this works out, i have to say its been a head trip but pretty rewarding. Ketai + processing~android is an awesome combo.
EDIT this is also a good tut on how to test the BT on the arduino can send data to your laptop via the built in arduino serial port window. (just make sure you load your sketch onto the arduino over the usb serial port, for me that something like /dev/tty.usbmodem… AND then change that in the serial port monitor to the BT serial port, something like /dev/tty-BtDeviceName)