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

Committer:
AzqDev
Date:
Mon May 15 19:53:08 2017 +0000
Revision:
7:ce337c044c1d
Parent:
4:1e48e6e5e996
weblinks

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AzqDev 0:39828a1d036f 1 // A class library to display Azoteq IQS620 registers on a terminal
AzqDev 0:39828a1d036f 2
AzqDev 7:ce337c044c1d 3 // More info on IQS620 sensor IC: http://www.azoteq.com/products/proxfusion/iqs620?mbed
AzqDev 0:39828a1d036f 4
AzqDev 7:ce337c044c1d 5 // ProxFusion 5-minute YouTube video: https://youtu.be/l7tO2ra5y74
AzqDev 0:39828a1d036f 6
AzqDev 0:39828a1d036f 7 #include "mbed.h"
AzqDev 0:39828a1d036f 8
AzqDev 0:39828a1d036f 9 #define DISPLAY_BAUD_RATE 115200 /* baud rate of serial terminal */
AzqDev 0:39828a1d036f 10
AzqDev 0:39828a1d036f 11
AzqDev 0:39828a1d036f 12 #if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL
AzqDev 0:39828a1d036f 13 #warning if USBSerial.h can't be found import this library: developer.mbed.org/users/mbed_official/code/USBDevice
AzqDev 0:39828a1d036f 14 // USBSerial.h comes from the library http://developer.mbed.org/users/mbed_official/code/USBDevice which MUST be imported for Teensy
AzqDev 0:39828a1d036f 15 #include "USBSerial.h"
AzqDev 0:39828a1d036f 16 // USBSerial.h comes from the library http://developer.mbed.org/users/mbed_official/code/USBDevice which MUST be imported for Teensy
AzqDev 0:39828a1d036f 17 #endif
AzqDev 0:39828a1d036f 18
AzqDev 0:39828a1d036f 19 #if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL
AzqDev 0:39828a1d036f 20 class IQS620Display : public USBSerial { // use our own USB serial port (requires USB driver to be installed, see Teensy Website)
AzqDev 0:39828a1d036f 21 public: void baud(int baudRate);
AzqDev 0:39828a1d036f 22 #else
AzqDev 0:39828a1d036f 23 class IQS620Display : public Serial { // use ARM mbed virtual serial port
AzqDev 0:39828a1d036f 24 #endif
AzqDev 0:39828a1d036f 25
AzqDev 0:39828a1d036f 26 public:
AzqDev 0:39828a1d036f 27 int frameCounter;
AzqDev 0:39828a1d036f 28 IQS620Display(); // constructor
AzqDev 0:39828a1d036f 29 void helloMessage(bool); // show startup message
AzqDev 0:39828a1d036f 30 void showStatus(int,int); // show headings and I2C Error Count
AzqDev 2:da8082c7476a 31 void showLine(char * buffer, char * color, int startbyte, int endbyte); // write one line of register data with color highlighting
AzqDev 4:1e48e6e5e996 32 void showRegisters(char *,char *,bool); // show IQS62x registers
AzqDev 0:39828a1d036f 33 };