       stringComplete = true;
     }
   }
-  alphaSigned = StrToFloat(inputString);
+  if (inputString == "i")
+  {
+    isSerialControl = true;
+  }
+  else
+  {
+   if (inputString == "o")
+   {
+     isSerialControl = false;
+   }
+   else
+   {
+     alphaSigned = StrToFloat(inputString);
+   }
+  }
   Serial.println(inputString);
   Serial.println(alphaSigned);
   inputString="";

double alphaSigned = 0;
String inputString = "";         // A string to hold incoming data
boolean stringComplete = false;  // Whether the string is complete

void setup()
{

    else
    {
	  // Brake
      digitalWrite(HbridgeLogicPin1, HIGH);
      digitalWrite(HbridgeLogicPin2, HIGH);
    }
	// \todo: add an input to enable manual rotation of the motor
  }
  delay(minTime_ms);

  sensorValue = analogRead(analogInPin);
  if (sensorValue < 10)
  { 
    // Motor is free to move to enable manual control
    digitalWrite(HbridgeEnablePin, LOW);
  }
  else
  { 
    digitalWrite(HbridgeEnablePin, HIGH);
  }
  if (false==isSerialControl)
  {
    alphaSigned = 2*((sensorValue-sensorValueMin)/(sensorValueMax - sensorValueMin)-0.5);  
  }
  alpha = max(fabs(alphaSigned), deadBand);
  alpha = min(alpha, 1);
    if (alphaSigned>fabs(deadBand))
