Register display for Azoteq IQS621 ultra low power I2C multi-function sensor.

Dependents:   IQS621_HelloWorld

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

More information on the IQS621 here:

Components / IQS621
Azoteq IQS621 ultra low power sensor for ambient light, magnetic field, capacitance and inductive proximity. Empowers next-generation user interfaces.


Low Cost Evaluation Board For Azoteq IQS621ultra low power I2C sensor for ambient light, magnetic field, capacitance, inductive proximity and temperature.


Serial Terminal Output

/media/uploads/AzqDev/iqs621-1-display-i2c-ultra-low-power-sensor-for-ambient-light-capacitive-touch-magnetic-field.gif
IQS621 Register display as performed by mbed LPC1768.
Note the frame number - over half a million register dumps were performed with zero I2C errors.

IQS621DisplayTerminal.h

Committer:
AzqDev
Date:
2017-05-14
Revision:
6:b57872cf5562
Parent:
5:2f315f806f0c

File content as of revision 6:b57872cf5562:

// A class library to display Azoteq IQS621 registers on a terminal

// More info on IQS621 sensor IC: http://bit.ly/IQS621-info

// IQS621 1-minute youtube video: N.A.

#include "mbed.h"

#define DISPLAY_BAUD_RATE 115200 /* baud rate of serial terminal */


#if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL
#warning if USBSerial.h can't be found import this library: developer.mbed.org/users/mbed_official/code/USBDevice
// USBSerial.h comes from the library http://developer.mbed.org/users/mbed_official/code/USBDevice which MUST be imported for Teensy
#include "USBSerial.h"
// USBSerial.h comes from the library http://developer.mbed.org/users/mbed_official/code/USBDevice which MUST be imported for Teensy
#endif

#if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL
class IQS621Display : public USBSerial { // use our own USB serial port (requires USB driver to be installed, see Teensy Website)
    public: void baud(int baudRate);
#else
class IQS621Display : public Serial { // use ARM mbed virtual serial port
#endif

  public:
    int frameCounter;
    IQS621Display(); // constructor
    void helloMessage(bool); // show startup message
    void showStatus(int,int); // show headings and I2C Error Count
    void showLine(char *,char *,int,int); // dump a formatted line
    void showRegisters(char * registers, char * colorArray, bool showAllRegisters); // show IQS62x registers
};