 
 int motorSpeed = 200;
 
-String command = "";
+String input = "";
   
 void setup()
 {

  
  while(Serial.available()) {
    character = Serial.read();    
    command.concat(character);
  }

  if (command != "") {
    String result = handleCommand(command);
    Serial.print(result + "\n");
    command = "";
  }
  
  delay(250);
}

String handleCommand(String command) {
  String result;
  
  if(command == "check battery status") {
    result = checkBatteryStatus();

  } else if(command == "stop") {
    result = halt();
  } else {
    result = "unknown command: " + command + ", arg: " + argument;
  }
    
  return result;
