void clearSerial() {
while (Serial1.read() >= 0) {;} //clear the buffer
}
Wrong.
It should be:
// Clear the incoming serial buffer
while(Serial.available() > 0)
{
Serial.read();
}
void clearSerial() {
while (Serial1.read() >= 0) {;} //clear the buffer
}
Wrong.
It should be:
// Clear the incoming serial buffer
while(Serial.available() > 0)
{
Serial.read();
}