 
 
 
-volatile int count = 0; //number of encoder counts (using a quadrature encoder)
+volatile int countA = 0; //number of encoder counts on encoder A
+volatile int countB = 0;
 
 //encoder pins: pins 2,3 are hardware interrupts
 const int encoderA = 2; 


void setup() {
  // put your setup code here, to run once:
  pinMode(encoderA, INPUT);
  pinMode(encoderB, INPUT);
  motor.attach(motorPin);
  steering.attach(servoPin);
  
  attachInterrupt(digitalPinToInterrupt(encoderA), inc, CHANGE);
  attachInterrupt(digitalPinToInterrupt(encoderB), inc, CHANGE);
  curr_time = millis();
  Serial.begin(250000);
  Serial.println("Running");

  delay(1);
}

void incA() {
  countA++;
}

void incB() {
  countB++;
}

float saturate(float value) {
