Connecting to Bluetooth Gold Mate from Amarino

Hi,

I’ve got an Arduino Mega 2560 and a Bluetooth Gold Mate. I’m trying to connect and send data from my phone using Amarino, but I’m not connecting to the Bluetooth Gold Mate properly.

On Amarino on my phone I can find the device and connect to it (from the phones perspective). When I do this the red STAT LED stops flashing, but the connect LED does not come on, and it never receives any of the data I send it?

Has anyone got any idea what would cause this ?

Thanks very much

#include <MeetAndroid.h>

MeetAndroid meetAndroid;

const int out1 = 13, out2 = 8, out3 = 9, out4 = 4, out5 = 5, out6 = 6, out7 = 7;

const int rxPin = 2, txPin = 3;


void setup() 
{
  // set pins to out/in
  pinMode(out1, OUTPUT);
  pinMode(out2, OUTPUT);
  pinMode(out3, OUTPUT);
  pinMode(out4, OUTPUT);
  pinMode(out5, OUTPUT);
  pinMode(out6, OUTPUT);
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);

  Serial.begin(9600);
  meetAndroid.registerFunction(startUpRoutine, 'A');
}

void loop() 
{
  // put your main code here, to run repeatedly: 
  meetAndroid.receive();
}



void startUpRoutine(byte flag, byte numOfValues)
{
   digitalWrite(out1, HIGH);
 digitalWrite(out6, HIGH);
 delay(500);
 digitalWrite(out2, HIGH);
 digitalWrite(out5, HIGH);
 delay(500);
 digitalWrite(out3, HIGH);
 digitalWrite(out4, HIGH);
 delay(1000);
    digitalWrite(out1, LOW);
    digitalWrite(out2, LOW);
    digitalWrite(out3, LOW);
    digitalWrite(out4, LOW);
    digitalWrite(out5, LOW);
    digitalWrite(out6, LOW);
}

Where are the links to your used hard- and software?

How have you wired the module?

Have you tried to connect to your Arduino from a Notebook?

Hi Pylon,

Thanks for the reply.

My bluetooth mate gold module is:

https://www.sparkfun.com/products/9358

I have wired it to the Arduino with Vcc = 5V, GND = GND, Rx = pin 2, Tx = pin 3, and RTS-0 and CTS-I are not connected.

http://www.arduino.cc/en/Main/ArduinoBoardMega2560

I'm running the Amarino app from my San Francisco 2 phone, running Gingerbread. I'm using the 'Test Event' (with ID = A) from the Amarino Plug In Bundle to send an integer every 3 seconds to test the setup so I can develop it.

http://www.amarino-toolkit.net/index.php/download.html

I can add the Bluetooth Mate Gold as a device to my notebook, but I don't know where to go from there in terms sending data to/from.

Thanks again,

Adam

I have wired it to the Arduino with Vcc = 5V, GND = GND, Rx = pin 2, Tx = pin 3, and RTS-0 and CTS-I are not connected.

Usually it's a good idea to connect RTS to CTS, if the device is doing the hardware handshake it will not block.

I can add the Bluetooth Mate Gold as a device to my notebook, but I don't know where to go from there in terms sending data to/from.

When you have connected the bluetooth device to your notebook, you get a new serial device (a virtual com port for the Windows division). Just connect to that with a serial terminal (putty is a possibility on Windows) and send the characters (commands) your trying to receive.

Hi Pylon,

Thanks for your input.

Turns out that on the Arduino Mega 2560 the Rx and Tx pins are swapped for the Bluetooth Mate Gold. And since I got the module second hand, the previous owner had desoldered the connect LED!

It's all working as required now.

All the best,

Adam