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:
- 12:158b7c3dc8dc
- Parent:
- 11:6258c43f559f
- Child:
- 13:12c6c0af1536
diff -r 6258c43f559f -r 158b7c3dc8dc main.cpp --- a/main.cpp Sat May 13 16:29:30 2017 +0000 +++ b/main.cpp Sun May 14 19:50:26 2017 +0000 @@ -41,21 +41,11 @@ int main() { terminal.helloMessage(false); // say hello but don't wait for a keypress iqs62x.configure(); // configure the IC + char * color = iqs62x.getTable(color_any_register_that_changed_in_the_previous_20_reads) ; 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 - - 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.readChangesEver; // table that highlights all registers that ever 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 - + terminal.showRegisters(iqs62x.registers, color, false); // display registers, color the registers that changed } } - // end of IQS621_HelloWorld.cpp \ No newline at end of file