A simple Hbridge driver library (tested with the L293D). It uses a PWM pin on the enable and two DIOs on the control pins. Versatile.
Fork of HBridge by
Diff: HBridge.h
- Revision:
- 1:ef9cf0926575
- Parent:
- 0:16208393c7ae
diff -r 16208393c7ae -r ef9cf0926575 HBridge.h --- a/HBridge.h Thu Sep 20 11:36:17 2012 +0000 +++ b/HBridge.h Fri Oct 09 07:21:02 2015 +0000 @@ -31,7 +31,7 @@ #ifndef HBRIDGERAW_H #define HBRIDGERAW_H - +#include "SoftPWM.h" #include "mbed.h" /** A simple HBridge controller library @@ -117,7 +117,7 @@ private: - PwmOut enable; + SoftPWM enable; DigitalOut Adrive; DigitalOut Bdrive;