diff --git a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino index 8caa58eabe1..860a3449d86 100644 --- a/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino +++ b/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino @@ -331,6 +331,9 @@ uint8_t spi_transaction(uint8_t a, uint8_t b, uint8_t c, uint8_t d) { void empty_reply() { if (CRC_EOP == getch()) { + // clear RX buffer. No more host data expected until after SYNC. + while (SERIAL.available()) + SERIAL.read(); SERIAL.print((char)STK_INSYNC); SERIAL.print((char)STK_OK); } else {