 int pivotSpinR = 1000; // time spinning right at pivot
 int pivotTurnL = 1000; // time turning left at pivot
 int pivotSpinL = 1000; // time spinning left at pivot
-int stallThresh = 500; // time stalled
-int hallTimeThresh = 100;
+// int stallThresh = 500; // time stalled
+// int hallTimeThresh = 100;
 
 // max and minimum motor speeds
 int maxS = 200;

  pivotFlag = true;
  pastNear = false;
  prevFlag = prevLine;
  for (int i = 0; i < 5; i++) {
    speedArrR[i] = prevLine;
    speedArrL[i] = prevLine;
  }
  arrPosR = 0;
  arrPosL = 0;
  prevHallR = false;
  prevHallL = false;
  state = 11; // at start, movement state is the startup state
  pastStalled = false;
  stalled = false;
}

void loop() {

const byte RMO = A6;          // right-middle IR distance sensor
const byte RRO = A7;          // right-peripheral IR distance sensor

// const byte L_Hall = 2;        // left Hall sensor
// const byte R_Hall = 3;        // right Hall sensor
const byte startModule = 4;   // remote start module

// Window size of the median filter (odd number, 1 = no filtering)
