Azoteq IQS624 Serial Terminal Display Class
Dependents: IQS624_HelloWorld Nucleo_ACM1602_I2C_DC_Angle
Library: IQSDisplayTerminal
Library for formatted display of IQS624 registers on a serial terminal
Screen Capture
Below is a screen capture of formatted output on a serial terminal program.
Note that over a million frames were captured with zero I2C errors.
IQS624 Summary
Ultra low power I2C sensor for 2D Magnetic Angle, Capacitive touch and Inductive Proximity
IQS624 mbed Component Link
IQS624 Pinout
IQS624 Connected to mbed LPC1768 board. The five wires are power(2), I2C(2) and RDY(1).
IQS624 Data Sheet
Azoteq IQS624 Data sheet & Evaluation Kit Information: http://bit.ly/IQS624_ds
IQS624 YouTube Link
IQS624 1-minute YouTube video: http://bit.ly/IQS624Video
IQSdisplayTerminal.h@6:9814a972e4bf, 2017-02-08 (annotated)
- Committer:
- AzqDev
- Date:
- Wed Feb 08 02:14:07 2017 +0000
- Revision:
- 6:9814a972e4bf
- Parent:
- 5:9d903309117c
- Child:
- 7:07fe2677d9a4
Update link
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AzqDev | 0:77730e5a870b | 1 | // A class library to display Azoteq IQS62x registers on a terminal |
AzqDev | 3:7932615d9349 | 2 | |
AzqDev | 3:7932615d9349 | 3 | // More info on IQS624 sensor IC: http://bit.ly/IQS624_info |
AzqDev | 3:7932615d9349 | 4 | |
AzqDev | 6:9814a972e4bf | 5 | // IQS624 1-minute youtube video: http://bit.ly/IQS624Video |
AzqDev | 5:9d903309117c | 6 | |
AzqDev | 0:77730e5a870b | 7 | #include "mbed.h" |
AzqDev | 2:1403d6a6af7b | 8 | |
AzqDev | 0:77730e5a870b | 9 | #define DISPLAY_BAUD_RATE 115200 /* baud rate of serial terminal */ |
AzqDev | 2:1403d6a6af7b | 10 | |
AzqDev | 4:4eecf56886b9 | 11 | |
AzqDev | 2:1403d6a6af7b | 12 | #if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL |
AzqDev | 4:4eecf56886b9 | 13 | #warning if USBSerial.h can't be found import this library: developer.mbed.org/users/mbed_official/code/USBDevice |
AzqDev | 4:4eecf56886b9 | 14 | // USBSerial comes from the library http://developer.mbed.org/users/mbed_official/code/USBDevice which MUST be imported for Teensy |
AzqDev | 2:1403d6a6af7b | 15 | #include "USBSerial.h" |
AzqDev | 4:4eecf56886b9 | 16 | // USBSerial comes from the library http://developer.mbed.org/users/mbed_official/code/USBDevice which MUST be imported for Teensy |
AzqDev | 2:1403d6a6af7b | 17 | #endif |
AzqDev | 2:1403d6a6af7b | 18 | |
AzqDev | 2:1403d6a6af7b | 19 | #if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL |
AzqDev | 2:1403d6a6af7b | 20 | class IQS62xDisplay : public USBSerial { // use our own USB serial port (requires USB driver to be installed, see Teensy Website) |
AzqDev | 2:1403d6a6af7b | 21 | public: void baud(int baudRate); |
AzqDev | 2:1403d6a6af7b | 22 | #else |
AzqDev | 2:1403d6a6af7b | 23 | class IQS62xDisplay : public Serial { // use ARM mbed virtual serial port |
AzqDev | 2:1403d6a6af7b | 24 | #endif |
AzqDev | 2:1403d6a6af7b | 25 | |
AzqDev | 0:77730e5a870b | 26 | public: |
AzqDev | 0:77730e5a870b | 27 | int frameCounter; |
AzqDev | 0:77730e5a870b | 28 | IQS62xDisplay(); // constructor |
AzqDev | 0:77730e5a870b | 29 | void helloMessage(bool); // show startup message |
AzqDev | 0:77730e5a870b | 30 | void showStatus(int,int); // show headings and I2C Error Count |
AzqDev | 0:77730e5a870b | 31 | void showRegisters(char *); // show IQS62x registers |
AzqDev | 0:77730e5a870b | 32 | }; |