 }
 
 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="";
}


#include <SoftwareSerial.h>
#include <SabertoothSimplified.h>

SoftwareSerial SWSerial(NOT_A_PIN, 8); // RX on no pin (unused), TX on pin 11 (to S1).
SabertoothSimplified ST(SWSerial); // Use SWSerial as the serial port.

const int analogInPin = A0;  // Analog input pin that the potentiometer is attached to
