 const float GEAR_RATIO = 46.85;
 const float ENCODER_CPR = 48;
 
-// Only using A changes to get ticks. Remove the "/ 2.0" if using both A
-// and B changes.
-const float TICKS_PER_REV = GEAR_RATIO * ENCODER_CPR / 2.0;
+// Number of encoder ticks per revolution of the wheel.
+const float TICKS_PER_REV = GEAR_RATIO * ENCODER_CPR;
 
 // Maximum desired motor speed. Pololu #2285 are rated for 130rpm, but we
 // don't drive them with enough voltage to achieve that.

  analogWrite(RIGHT_SPEED, abs(rightSpeed));
}

void handleLeftTick() {
  if (digitalRead(2) == digitalRead(8)) {
    ++leftTicks;
  } else {
    --leftTicks;
  }
}

void handleRightTick() {
  if (digitalRead(3) != digitalRead(9)) {
    ++rightTicks;
  } else {
    --rightTicks;

const int RIGHT_SPEED = 6;
const int RIGHT_DIRECTION = 7;

// Pins for the Pololu motor encoder outputs.
const int M1_A = 10;
const int M1_B = 11;
const int M2_A = 14;
const int M2_B = 15;

// Minimum motor control value. Motor output below this will stall.
const int MIN_MOTOR_CMD = 60;

