I'm experimenting with a hc-05 knockoff the JDY-30 and am confused about the Serial data I'm getting from it. I downloaded an app called BlueUino to send commands from my Android to my Arduino Uno via Bluetooth. I then print the data I get via Serial port using the code below:
if(Serial.available() > 0){ // Checks whether data is comming from the serial port
state = '1'; //Serial.read(); // Reads the data from the serial port0
stateData = Serial.read();
sprintf(data, "Data is %u", stateData);
Serial.println(data);
Serial.println();
}
Here are some of the results I get in the log which I can't make sense of. For example, sending the string "def" doesn't contain the sequence of data from sending the command "e". Also, how does one convert these values to characters ?
Send Command "b"
Data is 128
Data is 0
Data is 248
Send Command "abc":
Data is 120 // doesn't contain the sequence of Data of "b"
Data is 120
Data is 120
Data is 0
Data is 120
Data is 0
Data is 248
98
andb
are the same thing. Just different ways of representing the data.