if (debug) {
// 115200 is the fastest "standard" baud rate for debugging.
// Be sure to set the baud Tools=>Serial Monitor to 115200:
- Serial.begin(115200);
+ Serial.begin(9600);
}
// Set LED output pin:
digitalWrite(right_sonar_trigger, LOW);
}
-void motorsRun(int left, int right, int ms_delay) {
+void motors_run(int left, int right, int ms_delay) {
// Set left motor direction:
if (left > 0) {
// Set left motor to go forward:
// We timed out, so return *timeout*:
result = timeout;
}
- } // else *sonar_echo* is still high from the previous trigger;
- // return *timeout* when this occurs.
+ }
+ // else *sonar_echo* is still high from the previous trigger;
+ // return *timeout* when this occurs.
return result;
}
}
// Set the motor speeds:
- motorsRun(left_speed, right_speed, 0);
+ motors_run(left_speed, right_speed, 0);
}