Mouse code for the MacroRat

Dependencies:   ITG3200 QEI

Revision:
4:b5b7836ca2b0
Child:
5:7e1e4cc19044
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/irled.h	Fri Apr 28 02:13:24 2017 +0000
@@ -0,0 +1,28 @@
+#ifndef IRLED_H
+#define IRLED_H
+
+#include "mbed.h"
+
+#define samplesToTake 1000
+
+class IrLed
+{
+    public:
+        IrLed( PinName pin ) : ir( pin ) 
+        {
+            calibrateSensor();
+        }
+        
+        float getSamples( int i );
+        
+    private:
+        void calibrateSensor();
+        
+        // internal values
+        DigitalOut ir;
+        float sensorAvg;
+};
+
+
+
+#endif
\ No newline at end of file