 #include <TinyGPS++.h>
 #include <PID_v1.h>
 #include <PinChangeInt.h>
-
 
 mySoftwareSerial 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.

  isAbsoluteReference = true;
 }
 
void computePID()
{
  long steps = (halfSteps / 2);
  double relative_position_m = (halfSteps)*linearResolution/2;

double linearResolution = 0.005; //Resolution of the linear encoder (in meters)
double linearRange = 0.5; //Range of the sensor to normalize data (+/- linearRange/2)

double pi = 3.1415;
double potentiometerRangeDeg = 300; 
double potentiometerMaxRange = potentiometerRangeDeg * pi/180;
double potentiometerUsedRange = pi;
double potentiometerDistance = 0.05; //Distance from rotation axis to lever arm
//*********************************************************************************************

void setup()
{
  // Initialize software serial communication with Sabertooth 
  SWSerial.begin(9600);
  
  // Initialize serial communications at 9600 bps:
  Serial.begin(19200);
  
  // Initialize input and setpoint
  Input1 = 0;
  Input2 = 0;
  InputRoll = 0;
  Setpoint1 = 0;
  Setpoint2 = 0;
  SetpointRoll = 0;
  
  //turn the PID on
  myPID1.SetMode(AUTOMATIC);
  myPID2.SetMode(AUTOMATIC);
  myPIDRoll.SetMode(AUTOMATIC);
  myPID1.SetOutputLimits(-1, 1);
  myPID2.SetOutputLimits(-1, 1);
  myPIDRoll.SetOutputLimits(-1, 1);
  
  //*****************************************************
  pinMode(pinA, INPUT);
