   EEPROM_writeAnything(0, xv_config);
 }
 
+void initSerialCommands() {
+  sCmd.addCommand("MOTOROFF",    motorOff);
+}
+
+void motorOff() {
+  myPID.SetMode(MANUAL);
+  Timer3.pwm(xv_config.motor_pwm_pin, 0);
+  pwm_last = 0;
+}

  myPID.SetOutputLimits(xv_config.pwm_min,xv_config.pwm_max);
  myPID.SetSampleTime(20);
  myPID.SetMode(AUTOMATIC);
}

void loop() {
  // read byte from LIDAR and retransmit to USB
  if (Serial1.available() > 0) {
    inByte = Serial1.read();  // get incoming byte:

unsigned char motor_rph_low_byte = 0;
int motor_rph = 0;

SerialCommand sCmd;

void setup() {
  EEPROM_readAnything(0, xv_config);
