Updated for the next revision of the motor board
Diff: MotorShield.h
- Revision:
- 5:d2dffc88e94d
- Parent:
- 3:2f46953e7c8b
- Child:
- 7:e3a2ade56b79
diff -r 2b45973bdc67 -r d2dffc88e94d MotorShield.h --- a/MotorShield.h Wed Aug 26 02:49:34 2020 +0000 +++ b/MotorShield.h Wed Aug 26 14:37:16 2020 +0000 @@ -1,5 +1,8 @@ /* Library to interface with 2.74 Motor Shield ** Uses low level HAL libraries to enable high speed PWM +** Use as follows: +** - Create shield object and specify PWM period for the motors +** - Set the duty cycle and direction for each motor */ class MotorShield { @@ -7,10 +10,10 @@ public: MotorShield(int periodTicks); - void motorAWrite(double duty_cycle, int direction); - void motorBWrite(double duty_cycle, int direction); - void motorCWrite(double duty_cycle, int direction); - void motorDWrite(double duty_cycle, int direction); + void motorAWrite(float duty_cycle, int direction); + void motorBWrite(float duty_cycle, int direction); + void motorCWrite(float duty_cycle, int direction); + void motorDWrite(float duty_cycle, int direction); void changePeriod(int periodTicks); private: