Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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;