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:
11:79862bf306c1
Parent:
9:6bfea9af4dcb
Child:
14:0eff26aa0d17
--- a/Servo.h	Sun Oct 21 01:29:15 2012 +0000
+++ b/Servo.h	Sun Oct 21 03:30:36 2012 +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();