 
 #include <SoftwareSerial.h>
 #include <SabertoothSimplified.h>
+#include <TinyGPS++.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.

  if (inputString[0] == 'i')
  {
    isSerialControl = true;
    initialSensorValue = analogRead(analogInPin);
    if (inputString.substring(1)=="")
    {
      serialFrequency = 0;

double deadBand = 0.1; // Use to ensure zero speed. Should not be zero
double serialFrequency = 0;
long lastSerialInputTime = 0;
long lastWriteTime = 0;

TinyGPSPlus nmea;
TinyGPSCustom pwm(nmea, "ORPWM", 1); // $GPGSA sentence, 15th element


void setup()
{
  // Initialize software serial communication with Sabertooth 
  SWSerial.begin(9600);
  // Initialize serial communications at 9600 bps:
  Serial.begin(19200);
}

void SerialEvent() {

  inputString="";
  Serial.flush();
  while (Serial.available()) {
    // Get the new byte:
