From 5f85faf55b7352f3f8b6ce96af858c79436cb468 Mon Sep 17 00:00:00 2001 From: daniel watson Date: Sat, 2 Nov 2013 22:54:06 -0700 Subject: [PATCH] standardize phase3 more --- phase3/phase3.ino | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/phase3/phase3.ino b/phase3/phase3.ino index a2631b9..c660c6e 100644 --- a/phase3/phase3.ino +++ b/phase3/phase3.ino @@ -55,7 +55,7 @@ void setup() { 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: @@ -89,7 +89,7 @@ void setup() { 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: @@ -149,8 +149,9 @@ int ping(int sonar_trigger, int sonar_echo, int timeout) { // 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; } @@ -182,5 +183,5 @@ void loop() { } // Set the motor speeds: - motorsRun(left_speed, right_speed, 0); + motors_run(left_speed, right_speed, 0); } -- 2.30.2