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. /media/uploads/AzqDev/iqs624-display-screencap-1m.gif

IQS624 Summary

Ultra low power I2C sensor for 2D Magnetic Angle, Capacitive touch and Inductive Proximity

IQS624 mbed Component Link

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


IQS624 Pinout

/media/uploads/AzqDev/iqs624-pinout-s3.gif

/media/uploads/AzqDev/iqs624-and-lpc1768-tiny.gif

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

Revision:
2:1403d6a6af7b
Parent:
1:1c22cfb8b555
Child:
3:7932615d9349
--- a/IQSdisplayTerminal.cpp	Mon Feb 06 05:37:35 2017 +0000
+++ b/IQSdisplayTerminal.cpp	Tue Feb 07 22:36:01 2017 +0000
@@ -3,15 +3,22 @@
 
 #include "IQSdisplayTerminal.h"
 
+// constructor
+#if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL
+IQS62xDisplay::IQS62xDisplay() : USBSerial() // use our own USB device stack
+#else
+IQS62xDisplay::IQS62xDisplay() : Serial(USBTX,USBRX) // use mbed default serial port
+#endif
 
-// constructor
-IQS62xDisplay::IQS62xDisplay() : 
-    pc( USBTX, USBRX ) // first we run the constructor for the Serial port class
-{
+{    
     frameCounter=0;
-    pc.baud(DISPLAY_BAUD_RATE);
+    baud(DISPLAY_BAUD_RATE);
 }    
 
+#if defined(TARGET_TEENSY3_1) || defined (TARGET_TEENSY3_2) || IQS_USE_USBSERIAL
+void IQS62xDisplay::baud(int baudRate){}
+#endif
+
 // display a startup message to serial port
 void IQS62xDisplay::helloMessage(bool waitForUser) {
     puts("\x1b[2J  \x1b[?25l  \x1b[H"); // ANSII/VT100 codes to clear screen, invisible cursor, home cursor
@@ -19,7 +26,7 @@
     printf("To get a smooth screen refresh effect, use a terminal program that supports ANSI/VT100 escape codes such as Tera Term.\r\n\r\n");
     printf("Handy hint - In many terminal programs, Alt-B (break) will reset your Nucleo Board.\r\n\r\n");
     printf("Press any key to continue...\r\n");
-    if ( waitForUser ) while( ! pc.readable() ); // wait for keypress to continue
+    if ( waitForUser ) while( ! readable() ); // wait for keypress to continue
     puts("\x1b[2J  \x1b[?25l  \x1b[H"); // ANSII/VT100 codes to clear screen, invisible cursor, home cursor
 }