Register display for Azoteq IQS621 ultra low power I2C multi-function sensor.
A library that performs a register dump of the Azoteq IQS621 ultra low power multisensor registers.
More information on the IQS621 here:
Serial Terminal Output
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@0:6a124fa2a919, 2017-05-06 (annotated)
- Committer:
- AzqDev
- Date:
- Sat May 06 00:39:45 2017 +0000
- Revision:
- 0:6a124fa2a919
- Child:
- 3:10112b6b8d3c
IQS621 is up and running
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AzqDev | 0:6a124fa2a919 | 1 | // A class library to display Azoteq IQS621 registers on a terminal |
AzqDev | 0:6a124fa2a919 | 2 | |
AzqDev | 0:6a124fa2a919 | 3 | // More info on IQS621 sensor IC: http://bit.ly/IQS621-info |
AzqDev | 0:6a124fa2a919 | 4 | |
AzqDev | 0:6a124fa2a919 | 5 | // IQS621 1-minute youtube video: N.A. |
AzqDev | 0:6a124fa2a919 | 6 | |
AzqDev | 0:6a124fa2a919 | 7 | #include "mbed.h" |
AzqDev | 0:6a124fa2a919 | 8 | |
AzqDev | 0:6a124fa2a919 | 9 | #define DISPLAY_BAUD_RATE 115200 /* baud rate of serial terminal */ |
AzqDev | 0:6a124fa2a919 | 10 | |
AzqDev | 0:6a124fa2a919 | 11 | |
AzqDev | 0:6a124fa2a919 | 12 | #if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL |
AzqDev | 0:6a124fa2a919 | 13 | #warning if USBSerial.h can't be found import this library: developer.mbed.org/users/mbed_official/code/USBDevice |
AzqDev | 0:6a124fa2a919 | 14 | // USBSerial.h comes from the library http://developer.mbed.org/users/mbed_official/code/USBDevice which MUST be imported for Teensy |
AzqDev | 0:6a124fa2a919 | 15 | #include "USBSerial.h" |
AzqDev | 0:6a124fa2a919 | 16 | // USBSerial.h comes from the library http://developer.mbed.org/users/mbed_official/code/USBDevice which MUST be imported for Teensy |
AzqDev | 0:6a124fa2a919 | 17 | #endif |
AzqDev | 0:6a124fa2a919 | 18 | |
AzqDev | 0:6a124fa2a919 | 19 | #if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL |
AzqDev | 0:6a124fa2a919 | 20 | class IQS621Display : public USBSerial { // use our own USB serial port (requires USB driver to be installed, see Teensy Website) |
AzqDev | 0:6a124fa2a919 | 21 | public: void baud(int baudRate); |
AzqDev | 0:6a124fa2a919 | 22 | #else |
AzqDev | 0:6a124fa2a919 | 23 | class IQS621Display : public Serial { // use ARM mbed virtual serial port |
AzqDev | 0:6a124fa2a919 | 24 | #endif |
AzqDev | 0:6a124fa2a919 | 25 | |
AzqDev | 0:6a124fa2a919 | 26 | public: |
AzqDev | 0:6a124fa2a919 | 27 | int frameCounter; |
AzqDev | 0:6a124fa2a919 | 28 | IQS621Display(); // constructor |
AzqDev | 0:6a124fa2a919 | 29 | void helloMessage(bool); // show startup message |
AzqDev | 0:6a124fa2a919 | 30 | void showStatus(int,int); // show headings and I2C Error Count |
AzqDev | 0:6a124fa2a919 | 31 | void showRegisters(char *); // show IQS62x registers |
AzqDev | 0:6a124fa2a919 | 32 | }; |