software to control a DC motor, preferably interfacing with a motor driver.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DCMotor.h Source File

DCMotor.h

00001 #ifndef MBED_DCMOTOR_H
00002 #define MBED_DCMOTOR_H
00003 
00004 #include "mbed.h"
00005 
00006 class DCMotor {
00007 
00008 public:
00009     DCMotor(PinName PWMPin, PinName PinA, PinName PinB);
00010     void driveIt(float);
00011     
00012 protected:
00013     PwmOut _PWMPin;
00014     DigitalOut _PinA;
00015     DigitalOut _PinB;
00016 };
00017 
00018 #endif