readBytes() waits for characters until timeout (default 1000 ms)
void serial_flush() {
byte b;
while (Serial.readBytes(&b, 1) > 0);
}
readBytes() waits for characters until timeout (default 1000 ms)
void serial_flush() {
byte b;
while (Serial.readBytes(&b, 1) > 0);
}