 
 void stopRobot(){
 
-  motorAllStop();
-
   // send reply message
   Serial.println("0RS");
+
+  motorAllStop();
   printMotorPositions();
   
 }

// Outbound message definitions
#define CHECKSUM_FAILED "0CF"
#define UNRECOGNIZED_COMMAND "0UC"

// Encoder Board Variables
#define ROTARY_SLAVE_ADDRESS 5
#define ROTARY_COUNT 6
#define PRINT_DELAY 200


int bytes_to_store = 0;


    c.trim();

    // if mesage is incomplete send error message and flush serial 
    if(c.length() != 7){
      Serial.println("0IW");
      //Serial.println(c);
      serialFlush();
      return;
    }
