0
votes

i have a JY-MCU bluetooth module that is connected with a Arduino Uno and is running the following sketch (it was an example of the cordova bluetooth serial plugin):

 #include <SoftwareSerial.h>

 #define RxD 11
 #define TxD 10

 SoftwareSerial bluetooth(RxD,TxD);
 int counter = 0;

 void setup() 
 { 
  Serial.begin(9600);
  bluetooth.begin(9600); //Set BluetoothBee BaudRate to default baud rate 38400
  setupBluetooth();
  Serial.println("\nBluetooth Counter\n");
 } 

 void loop() {

  Serial.println(counter);
  bluetooth.print(counter);
  counter++;
  delay(1000);
 }

When im open the serial monitor with the USB-port, it counting from 0 and i see all things right. When im open the serial monitor with the bluetooth-port, im getting only diamonds with a question mark in it. Baudrate is on 9600, so thats not the problem.

Anyone knows what i have to do, to get the right values through bluetooth?

1
Diamonds with question mark look like non-printable characters being received. Could you just convert the received data to ASCII to see if you are receiving consecutive numbers or just garbage?Sembei Norimaki
Just a minute before we discoverd, that the bluetooth module isnt working. Got a new one and thats working... yeay..SeGa

1 Answers

0
votes

The module wasnt working right, we changed the module and all things work now.