Hello,
I have a strange problem regarding a project of mine. I'm using an Arduino Uno and a bluetooth module Pro. The code that I am testing is below:
#include <SoftwareSerial.h>
String contentblue = "";
char characterblue;
String content = "";
char character;
SoftwareSerial bluetooth(3, 2);
void setup() {
Serial.begin(115200);
delay(1);
bluetooth.begin(115200);
delay(1);
}
void loop() {
while(Serial.available() > 0){
character = Serial.read();
content.concat(character);
delay(1);
}
if(content != "") {
Serial.println(content);
bluetooth.println(content);
content = "";
delay(1);
}
while(bluetooth.available() > 0){
delay(1);
characterblue =(char) bluetooth.read();
delay(1);
contentblue.concat(characterblue);
delay(1);
}
if(contentblue != "") {
Serial.println(contentblue);
contentblue = "";
delay(1);
}
}
So I'm expecting when I type AT in the Serial monitor to get a response from the bt module like OK. The problem is that I'm getting only weird characters like these in the picture (attachment).
Any ideas ?
Thank you in advance,
Alex
