Test two motors using pwm with an LMD18200 H-Bridge Driver. Ramps both motors in either direction with a pwm frequency of 20kHz.

Fork of Motor by Simon Ford

Revision:
3:bab4eebbf1a0
Parent:
2:f265e441bcd9
--- a/Motor.h	Tue Nov 23 16:16:43 2010 +0000
+++ b/Motor.h	Thu Nov 08 15:52:42 2012 +0000
@@ -38,7 +38,7 @@
      * @param fwd A DigitalOut, set high when the motor should go forward
      * @param rev A DigitalOut, set high when the motor should go backwards
      */
-    Motor(PinName pwm, PinName fwd, PinName rev);
+    Motor(PinName pwm, PinName dir);
     
     /** Set the speed of the motor
      * 
@@ -48,8 +48,8 @@
 
 protected:
     PwmOut _pwm;
-    DigitalOut _fwd;
-    DigitalOut _rev;
+    DigitalOut _dir;
+//    DigitalOut _rev;
 
 };