How to clean up Serial port buffer

tuxduino:
serialEvent() is not an interrupt handler. Look inside hardware/arduino/cores/arduino/HardwareSerial.cpp

When I get the time. :slight_smile: If it just gets called before entering the loop() again... damn, I'll just have to look now
click, click, editor-woosh

for (;;) {
  loop();
  if (serialEventRun) serialEventRun();
  }

OK, so you could get called in the Serial.serialEvent routine with loads of characters, if your loop is full of delays - like the OP's 3 second.