Bluetooth Sensor Weird Data Send

I just want to sent some string data with using software serial, but it gives random question marks and some arabic letters. What might did I wrong?

#include <SoftwareSerial.h>
SoftwareSerial mySerial(10,11);

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  mySerial.begin(38400);
}

void loop() {
  mySerial.println("ab");
}

Try lowering that 38400 mySerial baud rate to 9600.

Mismatched bit rates could result in garbage.

Thanks it solved my problem. I thought this bit rate was only for Arduino-Hc-05 communication. Didn't think it caused the problem. In my other project, I have more complicated messages to send but some of them display corrupted (missing words etc.). I guess I can solve that problems too. Thanks again.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.