Go Down

Topic: Amarino - Android meets Arduino (Read 10063 times) previous topic - next topic

Bonifaz

Jun 09, 2010, 12:02 am Last Edit: Jun 09, 2010, 01:56 pm by abraxas Reason: 1
Many of you are already aware of Amarino, a toolkit which eases the communication between an Android powered phone and an Arduino via Bluetooth.

Amarino 2.0 has just been released with many new features and most important, is is now Android 2.x and backward compatible. plus it supports controlling several Arduinos in parallel.

more detail on Amarino's website

www.amarino-toolkit.net




mowcius

#1
Jun 09, 2010, 01:45 pm Last Edit: Jun 09, 2010, 01:52 pm by mowcius Reason: 1
//Message Removed//

Bonifaz

What do you mean by that.

Amarino is a project used by many Arduino users. It was already menioned in this forum here and people are happy to have an easy way to interact with a phone from their Arduino. And it is an open-source project.

Why should this be wrong?

mowcius

#3
Jun 09, 2010, 01:51 pm Last Edit: Jun 09, 2010, 01:52 pm by mowcius Reason: 1
Oh I am truly sorry, there was just some spam going round about android stuff yesterday.

I did not really read the post  :(

After a quick look, it does look like a good piece of software  ;)
You may also want to go back and edit your first post to make it a link now that you have posted once :)

Mowcius

admin

Good job Bonifaz!
I'm going to try it with my N1 :)


mellis

Excellent!  I'm still demoing the workout sleeve you made, btw.

Hi Bonifaz!
I haven't been able to connect an original arduino BT with a htc tattoo using your software.
I converted a rf toy car to a bluetooth remote controlled car. I'm using processing on my macbook pro to send the accelerometer data to the car. This is working now, but i would prefer to use the phone...
The monitor doesn't give to much info, only CONNECTION_FAILED
any idea why is not working?
thanks


Bonifaz

Although Amarino is fully Android 2.x compatible, Android 1.x is not completely covered. Most 1.x handsets will work but some won't, since in Android 1.x Bluetooth Serial Port Protocol was not really official supported some phone haven't implemented all necessary libraries.

It seems that HTC Tattoo and HTC Hero do not work with Amarino. However, once HTC deflivers Android 2.x to those devices they will work.

@mellis: Good to hear you and amazing info. I hope you like Amarino 2.0, because some of your ideas have been implemented.  ;)

vadda

Hi Bonifaz,
I already email you to thanks for this project.
Now, I've some problem to try Amarino.

HW :
- SparkFun Bluetooth Mate (BT-Serial-Bridge)
- Arduino Duemilanove
- HTC desire
- Amarino 2.0 installed + plugin

Problem :
Connection & pairing was Ok, but no data transit between HTC & Arduino
Also tested SensorGraph with some Arduino modified Code generating
data whitout sensor (just for test), but also no traffic found via BT.
There are tools/code to test/monitor data transit ?
The monitor function do not report any traffic.

Thanks
Luca


Bonifaz

#9
Jun 15, 2010, 11:47 am Last Edit: Jun 15, 2010, 11:48 am by abraxas Reason: 1
Your hardware should do fine.

  • Is your BT module set to 57600 baud?
  • Are you using the meetAndroid.send() function to send data?
  • Did the other way work, sending data from Android to Arduino?
You can test the Android to Arduino direction by going thru the Gettings Started Tutorial on Amarino's website.
http://www.amarino-toolkit.net/index.php/getting-started.html

One way to see all debug messages is to use the DDMS tool of the Android SDK. This gives you all log messages produced by your phone.

Download the Android SDK and start ddms.bat within the tools directory of the unzipped SDK.
http://developer.android.com/sdk/index.html
http://developer.android.com/guide/developing/tools/ddms.html

You have to enable debugging in your phone to see log messages via DDMS (Settings->Applications->Development->USB Debugging)

vadda

::) Mmmm.....
Maybe I'll miss to set the BT module to 57600.
Setting the BT module to 57600 is different from setting
Arduino serial to 57600, right ?

There is a specific method to do speed setting of the BT module ?

Bonifaz

#11
Jun 15, 2010, 12:17 pm Last Edit: Jun 15, 2010, 12:18 pm by abraxas Reason: 1
Oh yes there is a difference of how to set your BT module to 57600.
Serial.begin() must always match the speed of your BT module!

If you haven't done it yet, it is certainly not set to 57600, because default is 9600 or 115200.

This is the manual with the description of how to set a different speed.
http://www.sparkfun.com/datasheets/Wireless/Bluetooth/rn-bluetooth-um.pdf


vadda

Ok, thanks.
I'll working on this but it's not so clear for me how set the baud.
I's possible to do with the BT module connected at Arduino board or
must be done with the BT module connected at one PC and
programmed via terminal ?

Bonifaz

I always connected the module to my PC with HyperTerminal or Zterm on Mac.

Once you got connection, type
$$$
which enters the command mode.
The terminal should reply with CMD
then type
SU,57
terminal should return AOK (this sets the baud rate to 57600)
then type
---
and press return to exit the command mode.

I found a tutorial for you, but I think the commands are different. I don't exactly know which module you have so check the correct commands for your module. You will see if $$$  or +++ opens up the command mode.
http://www-inst.eecs.berkeley.edu/~ee192/sp10/design/abe_setup_bluesmirf.pdf

vadda

Ok, thanks a lot.
I've used the FTDI adapter in this way :



You need just to invert RX/TX and use stty or SerialPortTerminal (Ubuntu)
Now all working fine  ;D (I'm very happy !!!!)

In your "Getting started" it's explained very well,
but you may think to underline this step to help noob like me  :)

This is a very great project !!!  ;)

Go Up