Ultra Low Power (5uA) I2C Multi-Function Sensor with Light Sensor + Active (Reflective) IR + Touch + Hall Effect Sensor

Dependencies:   IQS622DisplayTerminal IQS62x mbed

Hello World! From Azoteq's IQS622 Ultra Low Power Multi-Sensor


This is a demo program for the Azoteq IQS622 ultra low power multi function sensor.

More details on the IQS622 component pages here:

Components / IQS622
Azoteq IQS622 ultra low power sensor for ambient light, active (reflective) IR, magnetic field, capacitance and inductive proximity. Empowers next-generation user interfaces.


Low Cost Evaluation Board for Azoteq IQS622 Ultra Low Power (5uA) I2C Multi-Function Sensor with Light Sensor, Active (Reflective) IR, Touch and Hall Effect Sensor

Revision:
7:926e53f6ac94
Parent:
6:af5c5cf511a9
Child:
8:57dbc9c20428
--- a/main.cpp	Sat May 13 02:51:37 2017 +0000
+++ b/main.cpp	Sat May 13 05:01:49 2017 +0000
@@ -46,13 +46,15 @@
         iqs62x.readIqsRegisters(0,NUMBER_OF_REGISTERS); // read all the registers
         terminal.showStatus(iqs62x.I2Cspeed,iqs62x.I2CErrorCount); // show heading and number of I2C errors
         
-        char * colorTable = iqs62x.writeFlag;        // table of all the registers that were written to (initialized)
-        // also try one of these:
-        // char * colorTable = iqs62x.readChanges;   // table of all the registers that changed since previous read
-        // char * colorTable = iqs62x.writeChanges;  // table of all the registers that changed since last write
-        // char * colorTable = 0;                    // no color highlighting
+        char * highlightTable; // a highlight table contains 1 byte for every register
+                              // if the byte is nonzero, the corresponding register contents is highlighted
+                              
+        highlightTable = 0;                    // use a NULL table to make all registers print plain with no highlighting
+        highlightTable = iqs62x.readChanges;   // special table to highlight all registers that changed since the previous read
+        highlightTable = iqs62x.writeChanges;  // special table to highlight all registers that have changed after being written/initialized
+        highlightTable = iqs62x.writeFlag;      // highlight all registers that were initialized - can be used to test configure()
         
-        terminal.showRegisters(iqs62x.registers,colorTable); // show IQS62x registers, color-highlight the registers flagged in colorTable
+        terminal.showRegisters(iqs62x.registers, highlightTable); // display the registers and highlight the ones marked in the table
     }
 }