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?
Reading serialBT string and compare it to another string
Re: Reading serialBT string and compare it to another string
is the "tmp_bt" reset somewhere?
are you sure that the incoming characters has no '\r' and-or '\n'?
are you sure that the "tmp_bt" and the singles chars in the end String has the same case?
did you try to print the incomings chars?
are you sure that the incoming characters has no '\r' and-or '\n'?
are you sure that the "tmp_bt" and the singles chars in the end String has the same case?
did you try to print the incomings chars?
Who is online
Users browsing this forum: No registered users and 63 guests