servo publish

Dependents:   TurtleBot_v01 TurtleBot_with_AHS

Fork of Servo by Jasper Denkers

Revision:
0:30b972d2dcec
Child:
1:352133517ccc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Servo.h	Sun Oct 17 13:13:50 2010 +0000
@@ -0,0 +1,24 @@
+#ifndef MBED_SERVO_H
+#define MBED_SERVO_H
+
+#include "mbed.h"
+
+class Servo {
+  
+public:
+    Servo(PinName Pin);
+    void SetPosition(int NewPos);
+    void Enable(int StartPos, int Period);
+    void Disable();
+
+private:
+    void StartPulse();
+    void EndPulse();
+
+    int Position;
+    DigitalOut ServoPin;
+    Ticker Pulse;
+    Timeout PulseStop;
+};
+
+#endif
\ No newline at end of file