diff --git a/robot_controller/constants.h b/robot_controller/constants.h new file mode 100644 index 0000000..9fcfd45 --- /dev/null +++ b/robot_controller/constants.h @@ -0,0 +1,12 @@ +#pragma once + +const float ACCEL_LIMIT = 4.0; // cm/s/s +const float VEL_LIMIT = 16.0; // cm/s +const float BACKLASH_RIGHT = 0.0; // degrees +const float BACKLASH_LEFT = 0.0; // degrees +const float WHEEL_DIAMETER = 6.37; // cm +const float WHEEL_TO_WHEEL = 0.0; // cm + +const float FORWARD_DISTANCE = 100.0; // cm +const float TURN_AMOUNT = 180.0; // degrees +const float RETURN_DISTANCE = 100.0; // cm diff --git a/robot_controller/robot_controller.ino b/robot_controller/robot_controller.ino index 10e0ed7..cf9f5fa 100644 --- a/robot_controller/robot_controller.ino +++ b/robot_controller/robot_controller.ino @@ -3,17 +3,7 @@ #include #include #include "trapezoidal.h" - -const float ACCEL_LIMIT = 4.0; // cm/s/s -const float VEL_LIMIT = 16.0; // cm/s -const float BACKLASH_RIGHT = 0.0; // degrees -const float BACKLASH_LEFT = 0.0; // degrees -const float WHEEL_DIAMETER = 6.37; // cm -const float WHEEL_TO_WHEEL = 0.0; // cm - -const float FORWARD_DISTANCE = 100.0; // cm -const float TURN_AMOUNT = 180.0; // degrees -const float RETURN_DISTANCE = 100.0; // cm +#include "constants.h" SmartMotor left_motor(0x0A); SmartMotor right_motor(0x0B);