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

Dependents:   Car_Simulator

DCMotor.h

Committer:
kaushalpkk
Date:
2011-07-15
Revision:
0:c92be90656b7
Child:
1:88772267f757

File content as of revision 0:c92be90656b7:

#ifndef MBED_DCMOTOR_H
#define MBED_DCMOTOR_H

#include "mbed.h"

class DCMotor {

public:
    DCMotor(PinName PWMPin, PinName PinA, PinName PinB);
    void driveIt(float);
    
protected:
    PwmOut _PWMPin;
    DigitalOut _PinA;
    DigitalOut _PinB;
};

#endif