Revision:
0:d4e07340fb0e
Child:
1:e06cf312e9f0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/I2CServo.h	Thu Jul 02 00:58:28 2015 +0000
@@ -0,0 +1,21 @@
+#ifndef INCLUDED_I2C_SERVO_H
+#define INCLUDED_I2C_SERVO_H
+
+#include "mbed.h"
+#include "I2CDevice.h"
+
+class I2CServo : public I2CDevice{
+public:
+    I2CServo( I2C* i2c, char address );
+    
+    void setPosition( float p ){
+        setPosition( static_cast< unsigned short >( p * 1024 ) );
+    }
+    
+    void write();
+    void read(){}
+private:
+    unsigned short mPosition;
+};
+
+#endif
\ No newline at end of file