arduino stuffs
Diffstat (limited to 'libraries/RobotMotor/RobotMotor4wd/RobotMotor.h')
| -rwxr-xr-x | libraries/RobotMotor/RobotMotor4wd/RobotMotor.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/libraries/RobotMotor/RobotMotor4wd/RobotMotor.h b/libraries/RobotMotor/RobotMotor4wd/RobotMotor.h new file mode 100755 index 0000000..452a1e0 --- /dev/null +++ b/libraries/RobotMotor/RobotMotor4wd/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_4WD // 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 |