Reading serialBT string and compare it to another string
Posted: Mon Jan 25, 2021 7:48 pm
hello I'm trying to read serial BT string, the basic code is:
While (SerialBT.availible()) {
Character = SerialBT.read();
tmp_bt.concat(Character);
}
If (tmp_bt.equals(string)) {
//Do that
}
string is predetermined text, if returns false, any advice what could go wrong?
While (SerialBT.availible()) {
Character = SerialBT.read();
tmp_bt.concat(Character);
}
If (tmp_bt.equals(string)) {
//Do that
}
string is predetermined text, if returns false, any advice what could go wrong?