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:
Revision 12:3dcc5918d30a, committed 2017-05-14
- Comitter:
- AzqDev
- Date:
- Sun May 14 19:54:53 2017 +0000
- Parent:
- 11:9360c3408909
- Child:
- 13:84494b9f6711
- Commit message:
- Simplified main
Changed in this revision
--- a/IQS622DisplayTerminal.lib Sat May 13 20:05:33 2017 +0000 +++ b/IQS622DisplayTerminal.lib Sun May 14 19:54:53 2017 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/Azoteq/code/IQS622DisplayTerminal/#a9a7666d8a98 +https://developer.mbed.org/teams/Azoteq/code/IQS622DisplayTerminal/#d095cb71bef0
--- a/IQS62x.lib Sat May 13 20:05:33 2017 +0000 +++ b/IQS62x.lib Sun May 14 19:54:53 2017 +0000 @@ -1,1 +1,1 @@ -https://mbed.org/teams/Azoteq/code/IQS62x/#6a2f52b5ac46 +https://mbed.org/teams/Azoteq/code/IQS62x/#b77c819f6c6a
--- a/main.cpp Sat May 13 20:05:33 2017 +0000
+++ b/main.cpp Sun May 14 19:54:53 2017 +0000
@@ -41,23 +41,11 @@
int main() {
terminal.helloMessage(false); // say hello but don't wait for a keypress
iqs62x.configure(); // configure the IC
- while(1) { // main loop to continuously dump all registers
+ char * color = iqs62x.getTable(color_any_register_that_was_written_or_initialized);
+ 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.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, true); // 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 IQS622_HelloWorld.cpp
-
// end of IQS622_HelloWorld.cpp
\ No newline at end of file
IQS622
IQS622-EVAL-1