From 1b159f3b72bdc0587dba8475134ecb517483d81b Mon Sep 17 00:00:00 2001 From: daniel watson Date: Fri, 13 Jun 2014 11:42:48 -0700 Subject: [PATCH] shorten turnaround and raise sonars above table --- .../h_stay_on_table/h_stay_on_table.ino | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/build-stages/h_stay_on_table/h_stay_on_table.ino b/build-stages/h_stay_on_table/h_stay_on_table.ino index 73f9e9b..07f7d17 100644 --- a/build-stages/h_stay_on_table/h_stay_on_table.ino +++ b/build-stages/h_stay_on_table/h_stay_on_table.ino @@ -14,19 +14,19 @@ */ // define which pins are connected to which components -int right_motor_speed_pin = 3; // orange wire -int right_motor_forward_pin = 4; // brown -int right_motor_backward_pin = 5; // purple +int right_motor_speed_pin = 3; +int right_motor_forward_pin = 4; +int right_motor_backward_pin = 5; -int right_echo_pin = 6; // white -int right_trigger_pin = 7; // blue +int right_echo_pin = 6; +int right_trigger_pin = 7; -int left_motor_speed_pin = 8; // orange -int left_motor_forward_pin = 9; // brown -int left_motor_backward_pin = 10; // purple +int left_motor_speed_pin = 8; +int left_motor_forward_pin = 9; +int left_motor_backward_pin = 10; -int left_echo_pin = 11; // white -int left_trigger_pin = 12; // blue +int left_echo_pin = 11; +int left_trigger_pin = 12; void on(int pin){ digitalWrite(pin, HIGH);} @@ -125,12 +125,12 @@ void loop(){ // adjust this number as necessary for your robot. // it represents how far the table is from your sonar sensor. // larger values mean larger distance. default is 400 - int right_max_ping_time_over_table = 400; - int left_max_ping_time_over_table = 400; + int right_max_ping_time_over_table = 500; + int left_max_ping_time_over_table = 500; int backup_time = 2000; // the exact amount of time for turning around might need // twerking for your robot. the default value is 3200 - int turn_around_time = 3200; + int turn_around_time = 2133; int actual_left_ping_time = ping(left_trigger_pin, left_echo_pin); int actual_right_ping_time = ping(right_trigger_pin, right_echo_pin); -- 2.30.2