Ulta Low Power I2C Multi-Sensor: Capacitive Touch, Magnetic Field & Inductive Proximity.
Dependencies: IQS620DisplayTerminal IQS62x mbed
Fork of IQS620_HelloWorld by
Hello World! From Azoteq's IQS620 Ultra Low Power Multi-Sensor
This is an mbed hardware demo program for the Azoteq IQS620 ultra low power multisensor.
More details on the IQS620 (and verified mbed boards) on these component pages:
IQS620 Eval Kit board Connected to mbed LPC1768 board.
Diff: main.cpp
- Revision:
- 8:fddce3223a97
- Parent:
- 7:7abb59b94800
- Child:
- 9:b289fdc8ce32
diff -r 7abb59b94800 -r fddce3223a97 main.cpp
--- a/main.cpp Sat May 13 00:39:43 2017 +0000
+++ b/main.cpp Sat May 13 08:53:29 2017 +0000
@@ -41,13 +41,20 @@
int main() {
terminal.helloMessage(false); // say hello but don't wait for a keypress
- wait(3);
iqs62x.configure(); // configure the IC
- while(1) {
+ while(1) { // main loop to continuously dump all registers
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.readChanges); // show IQS62x registers, highlight any changes
+
+ 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.writeChanges; // special table to highlight all registers that were written/configured but now contain a different value
+ highlightTable = iqs62x.writeFlag; // special table to highlight all registers that were initialized - can be used to verify configure()
+
+ terminal.showRegisters(iqs62x.registers, highlightTable); // display the registers and highlight the ones marked in the table
}
}
-
// end of IQS620_HelloWorld.cpp
\ No newline at end of file

IQS620A
IQS620A-EVAL-1