What do you suppose this code does, when SONAR_NUM == 1? I did not check any further.
for (uint8_t i = 1; i < SONAR_NUM; i++) // Set the starting time for each sensor.
What do you suppose this code does, when SONAR_NUM == 1? I did not check any further.
for (uint8_t i = 1; i < SONAR_NUM; i++) // Set the starting time for each sensor.