I have a module connected correctly with ArduinoUNO,(Tx, Rx, Vcc=5V ,GND), led d1 green blinks 2 times/ s, but when i search device with my pc(with debian or win7) and with my android phone, don’t find the bluetooth Grove module!!!
I tried with two Grove Blue module and behave the same way.
you should see which pin of Arduino be used to connect Bluetooth(RX,TX);
furthermore , see the wiki more carefully . if you still can’t succeed , it is better to sent the picture that show the way you connected and the code you have used.
This is the sketch that i used with arduinoUNO, and the bluetooth module connected with pin Rx=0 Tx=1, but doesn’t work!
I’ve not used the softserial lib…
[code] #define DEBUG_ENABLED 1
void setup()
{
setupBlueToothConnection();
}
void loop()
{
if(Serial.read() == ‘a’)
{
Serial.println(“You are connected to Serial Bluetooth Grove”);
//You can write you BT communication logic here
}
}
void setupBlueToothConnection()
{
Serial.begin(38400); //Set BluetoothBee BaudRate to default baud rate 38400
delay(1000);
sendBlueToothCommand("\r\n+STWMOD=0\r\n");
sendBlueToothCommand("\r\n+STNA=eSense1\r\n");
sendBlueToothCommand("\r\n+STAUTO=0\r\n");
sendBlueToothCommand("\r\n+STOAUT=1\r\n");
sendBlueToothCommand("\r\n +STPIN=0000\r\n");
delay(2000); // This delay is required.
sendBlueToothCommand("\r\n+INQ=1\r\n");
delay(2000); // This delay is required.
}
//Checks if the response “OK” is received.
void CheckOK()
{
char a,b;
while(1)
{
if(int len = Serial.available())
{
a = Serial.read();
if('O' == a)
{
b = Serial.read();
if('K' == b)
{
break;
}
}
}
}
while( (a = Serial.read()) != -1)
{
//Wait until all response chars are received
}
}
//Send the command to Serial Bluetooth Grove
void sendBlueToothCommand(char command[])
{
Serial.print(command);
CheckOK();
}[/code]
I have a similar Problem. But i think if your Green Led blinks its cause you reversed the tx and rx pins or the Bluetooth moduel. If that dosnt work try out some parts of the mastersketch included in the Seedstudio Bluetooth Shield demo Sketches (|>link<|)Skroll down a bit there it says Download arduino library. you can simply copy parts of the code and change the TX and RX pins and instead of “SeeedBTSlave” you have to type in the name of your pc.