Library for the VNH5019 Motor Driver, with a helper class for the Pololu Dual VNH5019 Dual Motor Driver Shield http://www.pololu.com/product/2502
Dependents: VNH5019_second VNH5019_second1
Revision 2:d670a4b999ab, committed 2014-02-01
- Comitter:
- ianmcc
- Date:
- Sat Feb 01 14:56:54 2014 +0000
- Parent:
- 1:5e8d9ed18f0f
- Child:
- 3:2b139675f60d
- Commit message:
- Added period function to set PWM period
Changed in this revision
VNH5019.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/VNH5019.h Sat Feb 01 14:46:45 2014 +0000 +++ b/VNH5019.h Sat Feb 01 14:56:54 2014 +0000 @@ -32,9 +32,13 @@ // enable the motor. void enable(); + + // set the PWM period of oscillation in seconds + void set_pwm_period(float p) + { PWM.period(p); } private: - void init(); // Initialize TIMER 1, set the PWM to 20kHZ. + void init(); DigitalOut INA; DigitalOut INB;