Revision:
0:9931e2ddc451
Child:
1:d1ca02f9536c
diff -r 000000000000 -r 9931e2ddc451 YMotorDriverServo.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/YMotorDriverServo.h	Sun Aug 23 15:18:10 2015 +0000
@@ -0,0 +1,31 @@
+#ifndef INCLUDED_YMOTOR_DRIVER_SERVO_H
+#define INCLUDED_YMOTOR_DRIVER_SERVO_H
+
+#include "mbed.h"
+#include "YMotorDriverBase.h"
+#include "PID.h"
+
+class YMotorDriverServo : public YMotorDriverBase, public PID{
+public:
+    YMotorDriverServo( char address, int id );
+    ~YMotorDriverServo();
+    
+    virtual void update();
+    
+private:
+    virtual void control( float c );
+
+    static const float mAllowableError;
+    static const PinName mAnalogInPinName;
+    static const float mLowPassFilterCoeff;
+    static const float mPCoeff[];
+    static const float mICoeff[];
+    static const float mDCoeff[];
+    
+    AnalogIn* mAnalogIn;
+    float mPosition;
+    float mTargetPosition;
+    int mID;
+};
+
+#endif
\ No newline at end of file