A simple class which can be used to control a motor through a HBridge (such as the L293).
HBridgeMotor.h
- Committer:
- harryeakins
- Date:
- 2011-09-20
- Revision:
- 0:a3bcb7eab9d9
File content as of revision 0:a3bcb7eab9d9:
#include "mbed.h"
class HBridgeMotor {
public:
HBridgeMotor(PinName fin, PinName rin);
void set(float power);
float read();
private:
float power;
PwmOut fwd, rev;
};