Guys my bluetooth shield is not functioning....
i uploaded the slave.pde and the red and green leds are blinking and when i connect my fone using terminal it stops....
but i cant see the recived characters in the serial monitor and i cant even see
+BITSTATE: 3
CONNECT: OK
+BITSTATE: 4
Connected!
i cant see this in terminal... i used to get this before now its not coming what must be the problem?
i am running the basic code ![]()
#include <SoftwareSerial.h> //Software Serial Port
#define RxD 6
#define TxD 7
#define DEBUG_ENABLED 1
SoftwareSerial blueToothSerial(RxD,TxD);
void setup()
{
Serial.begin(9600);
pinMode(RxD, INPUT);
pinMode(TxD, OUTPUT);
setupBlueToothConnection();
}
void loop()
{
char recvChar;
while(1){
if(blueToothSerial.available()){//check if there's any data sent from the remote bluetooth shield
recvChar = blueToothSerial.read();
Serial.print(recvChar);
}
if(Serial.available()){//check if there's any data sent from the local serial terminal, you can add the other applications here
recvChar = Serial.read();
blueToothSerial.print(recvChar);
}
}
}
void setupBlueToothConnection()
{
Serial.println("1");
blueToothSerial.begin(38400); //Set BluetoothBee BaudRate to default baud rate 38400
Serial.println("2");
blueToothSerial.print("\r\n+STWMOD=0\r\n"); //set the bluetooth work in slave mode
Serial.println("3");
blueToothSerial.print("\r\n+STNA=Bedroom\r\n"); //set the bluetooth name as "SeeedBTSlave"
Serial.println("4");
blueToothSerial.print("\r\n+STOAUT=1\r\n"); // Permit Paired device to connect me
blueToothSerial.print("\r\n+STAUTO=0\r\n"); // Auto-connection should be forbidden here
delay(2000); // This delay is required.
blueToothSerial.print("\r\n+INQ=1\r\n"); //make the slave bluetooth inquirable
Serial.println("The slave bluetooth is inquirable!");
Serial.println("5");
delay(2000); // This delay is required.
blueToothSerial.flush();
}