arduino stuffs
Diffstat (limited to 'libraries/RobotMotor/RobotMotor.h')
-rwxr-xr-xlibraries/RobotMotor/RobotMotor.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/libraries/RobotMotor/RobotMotor.h b/libraries/RobotMotor/RobotMotor.h
new file mode 100755
index 0000000..d626e17
--- /dev/null
+++ b/libraries/RobotMotor/RobotMotor.h
@@ -0,0 +1,37 @@
+/*******************************************************
+ RobotMotor.h
+ low level motor driver interface
+
+ Copyright Michael Margolis May 8 2012
+********************************************************/
+
+/* if you have the 4WD chassis, change the line:
+ #define CHASSIS_2WD
+ to:
+ #define CHASSIS_4WD
+ */
+
+#define CHASSIS_2WD // change suffix from 2WD to 4WD if using the 4WD chassis
+
+// defines for left and right motors
+const int MOTOR_LEFT = 0;
+const int MOTOR_RIGHT = 1;
+
+extern const int MIN_SPEED;
+extern int speedTable[];
+extern int rotationTime[];
+extern const int SPEED_TABLE_INTERVAL;
+extern const int NBR_SPEEDS;
+
+void motorBegin(int motor);
+
+// speed range is 0 to 100 percent
+void motorSetSpeed(int motor, int speed);
+
+void motorForward(int motor, int speed);
+
+void motorReverse(int motor, int speed);
+
+void motorStop(int motor);
+
+void motorBrake(int motor); \ No newline at end of file