         processIt = false;  //False until we have a request to process
     }  
 
-    // timeLeftStart = timeRightStart = timeCenterStart = 0;
     timeLeft = timeRight = timeCenter = timeStart = 0;
     roundCount = timeoutStart = timeSinceLastRound = 0;
     isr1Count = isr2Count = isr3Count = 0;
-
-    // timeLeftStartSet = false;
-    // timeRightStartSet = false;
-    // timeCenterStartSet = false;
     timeStartSet = false;
  
     pinMode(S_DEC1, OUTPUT);        //Pin 5 (PWM)       --> SD1

 

// -------------------------------------------------------------------------------------------------
void IsrRight()
{
    //ISR for end of pulse on sonar 1, 2 or 3
    noInterrupts(); 

    isr3Count++; 

    if (digitalRead(PW_OR2) == HIGH && timeStartSet == false)
    // if (ibh(PIND, PD1) && !timeStartSet)
    {
        timeStart = micros();        
        timeStartSet = true;

volatile unsigned long timeCenter;

volatile unsigned long timeStart;
volatile bool timeStartSet;

//For SPI communications
volatile unsigned long timeWriteStart;
volatile byte valueIn;
volatile bool processIt;

int range[RANGE_DATA_SIZE][SAMPLE_DATA_SIZE]{};
int analogRange[RANGE_DATA_SIZE]{};

int roundCount, timeoutStart, timeSinceLastRound;
byte boardCount, sampleIndex;

volatile int isr1Count, isr2Count, isr3Count;


// -------------------------------------------------------------------------------------------------
void setup()
{
    if (DEBUG_MODE)
    {
        //DEBUG LED test
        pinMode(DEBUG_PIN, OUTPUT);

        //Baud rate configured for 115200
        //It communicates on digital pins 0 (RX) and 1 (TX) as well as with the computer via USB
        Serial.begin(BAUD_RATE);
        digitalWrite(DEBUG_PIN, HIGH);
    }
    else
