Motor Shield Example code for 2.74 Class @ MIT
Dependents: experiment_example motor_shield_example Lab3_experiment_example jumping_leg_clicky
MotorShield.h
- Committer:
- elijahsj
- Date:
- 2020-08-26
- Revision:
- 3:2f46953e7c8b
- Parent:
- 1:4c3c2b7337a6
- Child:
- 5:d2dffc88e94d
File content as of revision 3:2f46953e7c8b:
/* Library to interface with 2.74 Motor Shield ** Uses low level HAL libraries to enable high speed PWM */ class MotorShield { 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 changePeriod(int periodTicks); private: int periodTickVal; void init(); };