Laser Sensing Display for UI interfaces in the real world

Dependencies:   mbed

Fork of skinGames_forktest by Alvaro Cassinelli

Revision:
22:d87317d7ca91
Parent:
14:0fc33a3a7b4b
Child:
23:bf666fcc61bc
--- a/hardwareIO/hardwareIO.h	Sun May 06 14:40:19 2012 +0000
+++ b/hardwareIO/hardwareIO.h	Sat Jun 02 06:38:12 2012 +0000
@@ -6,6 +6,9 @@
 #include "lockin.h"
 
 
+// potentiometer to change sensitivity by hand:
+//AnalogIn ain(p20);
+
 // NOTE: the SPI library uses the following pins, but we don't have to set them and inputs or outputs (this is done when the library is initialized, which is done by pre-instantiation. 
 #define SCK_PIN   p7 //SPI Clock
 #define MISO_PIN  p6 //SPI input (data comming from DAC, here not connected) 
@@ -42,11 +45,13 @@
 //      65              6               63
 //  ...
 #define NB_SCANS 8 // number of scans performed to generate the LUT table (actually, each site CUMULATES NB_SCANS values)
+                   // IMPORTANT: NB_SCANS*4095 should not exceed the capacity of uint16, this is 2^16-1=65535.
+                   // In other terms, NB_SCANS should be < 65535/4095=16
 
 #define LUT_FILENAME "/local/LUT.txt"
 
 // For checking (define if human readable file is required - note: it is not used by the program, just as output for human reading)
-//#define LUT_H_FILENAME "/local/LUT_pos.txt"
+#define LUT_H_FILENAME "/local/LUT_pos.txt"
 
 // Current Look-up table approximation (only one at a time!): 
 //#define LUT_BILINEAR 
@@ -88,6 +93,8 @@
     
     void scan_serial(unsigned short pointsPerLine = 400);
 
+    void showLimitsMirrors( int times );
+
     // SPI control for DAC for mirrors and red laser power (low level): 
     void writeOutX(unsigned short value);
     void writeOutY(unsigned short value);