My modifications/additions to the code

Dependencies:   ADXL345 ADXL345_I2C IMUfilter ITG3200 Servo fishgait mbed-rtos mbed pixy_cam

Fork of robotic_fish_ver_4_8 by jetfishteam

Revision:
5:090ef6275773
Child:
6:a4d6f3e4bf28
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PwmReader.h	Tue Jan 28 23:59:21 2014 +0000
@@ -0,0 +1,23 @@
+#pragma once
+#include "mbed.h"
+
+class PwmReader
+{
+    public:
+    PwmReader();
+    PwmReader(PinName pwmInPort);
+    ~PwmReader();
+    
+    float getDuty();         //0 to 1
+    
+    protected:
+    void pwmRise();    //0 to 1
+    void pwmFall();    //-1 to 1
+    
+    InterruptIn* di;
+    int lastRise;
+    int period;
+    float duty;
+    Timer t; 
+    
+};
\ No newline at end of file