diff --git a/Arduino/Moppy/Moppy.pde b/Arduino/Moppy/Moppy.ino similarity index 98% rename from Arduino/Moppy/Moppy.pde rename to Arduino/Moppy/Moppy.ino index 67a94d8..3dc5ec4 100644 --- a/Arduino/Moppy/Moppy.pde +++ b/Arduino/Moppy/Moppy.ino @@ -89,7 +89,10 @@ void loop(){ //Watch for special 100-message to reset the drives if (Serial.peek() == 100) { resetAll(); - Serial.flush(); + //Flush any remaining messages. + while(Serial.available() > 0){ + Serial.read(); + } } else{ currentPeriod[Serial.read()] = (Serial.read() << 8) | Serial.read();