A simple library for driving RC servos without using the mbed's PWM functions. This allows the mbed to drive as many servos as there are DigitalOut pins, and additionally allows for the PWM functions to be used at a different frequency than the 50Hz used for servos.

Revision:
14:0eff26aa0d17
Parent:
13:896410a1b594
Parent:
11:79862bf306c1
Child:
15:55221f9de707
--- a/Servo.h	Wed Jan 09 21:06:59 2013 +0000
+++ b/Servo.h	Wed Jan 09 21:08:53 2013 +0000
@@ -18,6 +18,11 @@
     operator float();
     operator int();
     
+    unsigned int center;
+    float usPerDegree;
+    float upperLimit;
+    float lowerLimit;
+    
 protected:
     static unsigned int numServos;
     static Servo *servos[];
@@ -27,10 +32,7 @@
     unsigned int pulseWidth;
     DigitalOut signalPin;
     
-    unsigned int center;
-    float usPerDegree;
-    float upperLimit;
-    float lowerLimit;
+    
     
     static void refresh();
     void timeout();