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.
pwm.h
- Committer:
- BAC
- Date:
- 2015-12-15
- Revision:
- 2:d7cd4deef7be
- Parent:
- 0:f15aa1706e16
File content as of revision 2:d7cd4deef7be:
#include "mbed.h" class MotorDriver { private: unsigned int D1,D2,D3; unsigned int du1[500],du2[500],du3[500]; public: PwmOut M1; PwmOut M2; PwmOut M3; MotorDriver(); void Actuate(); // duty = pulsewidth in us void Angle2Duty(float a, float b, float c); void DirectDrive(unsigned int d1, unsigned int d2, unsigned int d3); void DriveTable(unsigned int index); unsigned GetD1 (void); unsigned GetD2 (void); unsigned GetD3 (void); unsigned Getdu1 (unsigned int i); unsigned Getdu2 (unsigned int i); unsigned Getdu3 (unsigned int i); };