Laser Sensing Display for UI interfaces in the real world

Dependencies:   mbed

Fork of skinGames_forktest by Alvaro Cassinelli

Revision:
10:6f8e48dca1bd
Parent:
1:a4050fee11f7
Child:
14:0fc33a3a7b4b
--- a/hardwareIO/lockin.h	Wed Apr 11 13:06:23 2012 +0000
+++ b/hardwareIO/lockin.h	Wed Apr 11 14:51:08 2012 +0000
@@ -37,9 +37,9 @@
     void setLaserPower(bool power); //change PWM settings to turn on/off the laser
     
     
-    float getSmoothValue(); //return the average of the value stored on the buffer
-    float getLastValue(); //return the last conversion of the ADC
-    float getMedianValue(); //return the median value of the buffer
+    unsigned short getSmoothValue(); //return the average of the value stored on the buffer
+    unsigned short getLastValue(); //return the last conversion of the ADC
+    unsigned short getMedianValue(); //return the median value of the buffer
     //it is just a begining; we can add more complex method for denoising for exemple
     //maybe, needs function to start and stop the lockin
     
@@ -49,7 +49,7 @@
     //void catchInterupt(uint32_t value);
     
     //variables
-    float buffer[BUFFER_SIZE];  // does not need to be a float - in fact values are from 0 to 4096 (i.e., 
+    unsigned short buffer[BUFFER_SIZE];  // does not need to be a float - in fact values are from 0 to 4096 (i.e., 
     //unsigned short int buffer[BUFFER_SIZE]; // this is two bytes (0 to 65535)
     int buffer_pos;