Register Display of Azoteq IQS620 Magnetic/Touch/Inductive sensor

Dependents:   IQS620_HelloWorld

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

More information on the IQS620 here:

Components / IQS620A
Ultra low power sensor for magnetic field, capacitive touch and inductive proximity. Empowers next-generation user interfaces.

Low Cost Evaluation Board For Azoteq IQS620A ultra low power sensor for magnetic field, capacitance, inductive proximity and temperature. Empowers next-generation user interfaces.

Serial Terminal Output

/media/uploads/AzqDev/iqs620-azoteq-multi-function-sensor-mbed-library-register-display.gif

IQS620DisplayTerminal.h

Committer:
AzqDev
Date:
2017-05-15
Revision:
7:ce337c044c1d
Parent:
4:1e48e6e5e996

File content as of revision 7:ce337c044c1d:

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

// More info on IQS620 sensor IC: http://www.azoteq.com/products/proxfusion/iqs620?mbed

// ProxFusion 5-minute YouTube video: https://youtu.be/l7tO2ra5y74

#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 IQS620Display : public USBSerial { // use our own USB serial port (requires USB driver to be installed, see Teensy Website)
    public: void baud(int baudRate);
#else
class IQS620Display : public Serial { // use ARM mbed virtual serial port
#endif

  public:
    int frameCounter;
    IQS620Display(); // constructor
    void helloMessage(bool); // show startup message
    void showStatus(int,int); // show headings and I2C Error Count
    void showLine(char * buffer, char * color, int startbyte, int endbyte); // write one line of register data with color highlighting
    void showRegisters(char *,char *,bool); // show IQS62x registers
};