Ultra Low Power (5uA) I2C Sensor With Ambient Light Sensing (ALS) + Capacitive Proximity/Touch + Hall Effect Sensor + Inductive Proximity (Metal Detect)
Dependencies: IQS621DisplayTerminal IQS62x mbed
Hello World! From Azoteq's IQS621 Ultra Low Power Multi-Sensor
This is a demo program for the Azoteq IQS621 ultra low power multi function sensor.
Diff: main.cpp
- Revision:
- 9:37cf595b0f7d
- Parent:
- 7:5161c542cdda
- Child:
- 10:3d189e1c9eeb
diff -r 568a1cfba19a -r 37cf595b0f7d main.cpp --- a/main.cpp Sat May 13 00:42:29 2017 +0000 +++ b/main.cpp Sat May 13 09:13:59 2017 +0000 @@ -45,8 +45,17 @@ while(1) { iqs62x.readIqsRegisters(0,NUMBER_OF_REGISTERS); // read all the registers terminal.showStatus(iqs62x.I2Cspeed,iqs62x.I2CErrorCount); // show heading and number of I2C errors - terminal.showRegisters(iqs62x.registers, iqs62x.writeChanges); // show IQS62x registers & color-highlight changes in initialized registers - } + + char * highlightTable; // a highlight table contains 1 byte for every register + // if a byte in a highlight table is nonzero, the corresponding register value will be highlighted during display + 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.writeFlag; // special table to highlight all registers that were initialized - can be used to verify configure() + highlightTable = iqs62x.writeChanges; // special table to highlight all registers that were written/configured but now contain a different value + + terminal.showRegisters(iqs62x.registers, highlightTable); // display the registers and highlight the ones marked in the table + + } } // end of IQS621_HelloWorld.cpp \ No newline at end of file