Register Display On Serial Terminal For Azoteq IQS622 Ultra Low Power (5uA) I2C Multi-Function Sensor with Light Sensor + Active (Reflective) IR + Touch + Hall Effect Sensor

Dependents:   IQS622_HelloWorld

A library that performs a register dump of the Azoteq IQS622 ultra low power multisensor registers.

More information on the IQS622 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


Committer:
AzqDev
Date:
Tue May 09 04:55:29 2017 +0000
Revision:
0:932376194edb
Child:
1:20266bfaa709
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AzqDev 0:932376194edb 1 // A class library to display Azoteq IQS622 registers on a terminal
AzqDev 0:932376194edb 2
AzqDev 0:932376194edb 3 // More info on IQS622 sensor IC: http://bit.ly/IQS622-info
AzqDev 0:932376194edb 4
AzqDev 0:932376194edb 5 // IQS622 1-minute youtube video: N.A.
AzqDev 0:932376194edb 6
AzqDev 0:932376194edb 7 #include "mbed.h"
AzqDev 0:932376194edb 8
AzqDev 0:932376194edb 9 #define DISPLAY_BAUD_RATE 115200 /* baud rate of serial terminal */
AzqDev 0:932376194edb 10
AzqDev 0:932376194edb 11
AzqDev 0:932376194edb 12 #if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL
AzqDev 0:932376194edb 13 #warning if USBSerial.h can't be found import this library: developer.mbed.org/users/mbed_official/code/USBDevice
AzqDev 0:932376194edb 14 // USBSerial.h comes from the library http://developer.mbed.org/users/mbed_official/code/USBDevice which MUST be imported for Teensy
AzqDev 0:932376194edb 15 #include "USBSerial.h"
AzqDev 0:932376194edb 16 // USBSerial.h comes from the library http://developer.mbed.org/users/mbed_official/code/USBDevice which MUST be imported for Teensy
AzqDev 0:932376194edb 17 #endif
AzqDev 0:932376194edb 18
AzqDev 0:932376194edb 19 #if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL
AzqDev 0:932376194edb 20 class IQS622Display : public USBSerial { // use our own USB serial port (requires USB driver to be installed, see Teensy Website)
AzqDev 0:932376194edb 21 public: void baud(int baudRate);
AzqDev 0:932376194edb 22 #else
AzqDev 0:932376194edb 23 class IQS622Display : public Serial { // use ARM mbed virtual serial port
AzqDev 0:932376194edb 24 #endif
AzqDev 0:932376194edb 25
AzqDev 0:932376194edb 26 public:
AzqDev 0:932376194edb 27 int frameCounter;
AzqDev 0:932376194edb 28 IQS622Display(); // constructor
AzqDev 0:932376194edb 29 void helloMessage(bool); // show startup message
AzqDev 0:932376194edb 30 void showStatus(int,int); // show headings and I2C Error Count
AzqDev 0:932376194edb 31 void showRegisters(char *); // show IQS62x registers
AzqDev 0:932376194edb 32 };