[SOLVED]Flush serial input buffer

readBytes() waits for characters until timeout (default 1000 ms)

void serial_flush() {
  byte b;
  while (Serial.readBytes(&b, 1) > 0);
}