Arduino UNO + HC05 => Code runs with Delay / slow

Instead of adjusting the timeout, send a terminator. btSerial.parseInt() will wait for a non-digit till it times out. If you send e.g. "1\n" instead of "1", it will pick up the non-digit ('\n') and stop the parsing.

Similar applies to e.g. Serial.readString() but in that case you will have to use Serial.readStringUntil() after adding the terminator in your sender.

If you set it too low, it might timeout on multi-character input.

1 Like