 }
 
 void serialEvent() {
+  Serial.flush();
   while (Serial.available()) {
     // Get the new byte:
     char inChar = (char)Serial.read();

     {
       alphaSigned = StrToFloat(inputString);
       lastSerialInputTime = millis();
       Serial.println(alphaSigned);
     }
   }
  }
  Serial.println(inputString);
  inputString="";
}


      alphaSigned = 0;
    }
  }
  //Serial.println(sensorValue);
  alphaSigned = min(1, max(-1, alphaSigned));

}
