Ultra Low Power (5uA) 2D Rotating Magnetic Angle Sensor + Touch + Inductive Proximity (Metal Detect)

Dependencies:   IQS62x IQSDisplayTerminal mbed

IQS624 Hello World

Ultra Low Power (5uA) I2C ProxFusion™ sensor for 2D Magnetic Angle + Touch + Proximity

/media/uploads/AzqDev/iqs624-and-lpc1768-tiny.gif
IQS624 connected to mbed LPC1768. The five wires are - 2x I2C, 2x Power, 1x RDY.
You can get get a low cost (<$10) evaluation kit containing the small board shown above (cables & LPC1768 not included) from Mouser - http://bit.ly/IQS624-Eval-Kit-Mouser

IQS624 Information

Azoteq IQS624 is an ultra low power (5uA) I2C sensor for 2D Rotating Magnetic Fields, Capactive Touch and Inductive Proximity.
Designed for next generation user interfaces.

Data sheet & eval kit info: http://www.azoteq.com/products/proxfusion/iqs624?mbed

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-5-pinout-for-i2c-ultra-low-power-sensor-with-2d-magnetic-angle-capacitive-touch-inductive.gif

IQS624 Data Sheet & Evaluation Kit Information


http://www.azoteq.com/products/proxfusion/iqs624?mbed

IQS624 Interconnection

/media/uploads/AzqDev/iqs624-3-connect-mbed-i2c-ultra-low-power-sensor-with-2d-magnetic-angle-capacitive-touch.gif
/media/uploads/AzqDev/iqs624-and-teensy-tiny.gif
IQS624 connected to mbed Teensy 3.1 (actually Teensy 3.2) using 5 wires - 2x I2C, 2x Power, 1x RDY.

IQS624 YouTube Links


IQS624 1-minute YouTube video: http://bit.ly/IQS624Video

ProxFusion for active pens: https://youtu.be/tUImswNPQY4

Committer:
AzqDev
Date:
Tue Jan 23 15:22:49 2018 +0000
Revision:
30:e644a57c1692
Parent:
24:4d6d4d7b919d
Updated mbed library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AzqDev 0:e20adaf21bb6 1 // IQS624-HelloWorld.cpp
AzqDev 0:e20adaf21bb6 2
AzqDev 0:e20adaf21bb6 3 // Hello World program for Azoteq IQS624 ultra low power sensor for 2D magnetic angle, capacitive touch and inductive proximity sensor.
AzqDev 0:e20adaf21bb6 4
AzqDev 23:2817d2f3145d 5 // More info on Azoteq IQS624 page: http://www.azoteq.com/products/proxfusion/iqs624?mbed
AzqDev 3:956d9eac7af5 6
AzqDev 8:e2030ed39638 7 // IQS624 1-minute youtube video: http://bit.ly/IQS624Video
AzqDev 7:4c9caa1d025c 8
AzqDev 23:2817d2f3145d 9 // IQS624 hardware page on mbed: https://developer.mbed.org/components/IQS624/
AzqDev 23:2817d2f3145d 10
AzqDev 23:2817d2f3145d 11 // IQS624 eval kit page on mbed: https://developer.mbed.org/components/IQS624-EVAL-1/
AzqDev 23:2817d2f3145d 12
AzqDev 0:e20adaf21bb6 13 // Copyright 2017 Azoteq. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
AzqDev 0:e20adaf21bb6 14
AzqDev 23:2817d2f3145d 15 // Output is via the USB debug serial port to any VT100-compatible terminal emulator such as Tera Term or Putty. (Set background to white)
AzqDev 0:e20adaf21bb6 16
AzqDev 23:2817d2f3145d 17 // Tested on the following MBED hardware
AzqDev 0:e20adaf21bb6 18 // Note: When compiling for new hardware, use "Compile All" to rebuild everything
AzqDev 9:8dcee60ce764 19 // 1. ST Micro Nucleo-L152RE Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690E01
AzqDev 9:8dcee60ce764 20 // 2. ST Micro Nucleo-F401RE Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690E01
AzqDev 9:8dcee60ce764 21 // 3. ST Micro Nucleo-L476RG Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690E01
AzqDev 9:8dcee60ce764 22 // 4. ST Micro Nucleo-L053R8 Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690E01
AzqDev 9:8dcee60ce764 23 // 5. ST Micro Nucleo-F446RE Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690E01
AzqDev 9:8dcee60ce764 24 // 6. ST Micro Disco-F746NG Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690E01
AzqDev 9:8dcee60ce764 25 // 7. Freescale FRDM-KL46Z Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690E01
AzqDev 9:8dcee60ce764 26 // 8. Freescale FRDM-KL25Z Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690E01
AzqDev 9:8dcee60ce764 27 // 9. mbed LPC1768 Azoteq adapter AZP690E01 [SDA,SCL,RDY] wired to LPC1768 [p28,p27,p26]
AzqDev 9:8dcee60ce764 28 // 10. mbed LPC11U24 Azoteq adapter AZP690E01 [SDA,SCL,RDY] wired to LPC11U24 [p28,p27,p26]
AzqDev 0:e20adaf21bb6 29
AzqDev 3:956d9eac7af5 30 // These two boards additionally require the USBDevice library: https://developer.mbed.org/users/mbed_official/code/USBDevice/
AzqDev 20:f0e446e5b209 31 // 11. Teensy 3.1 Azoteq adapter AZP690E01 [SDA,SCL,RDY] wired to Teensy 3.1 [p18,p19,p2]
AzqDev 20:f0e446e5b209 32 // 12. Teensy 3.2 Azoteq adapter AZP690E01 [SDA,SCL,RDY] wired to Teensy 3.2 [p18,p19,p2]
AzqDev 3:956d9eac7af5 33
AzqDev 23:2817d2f3145d 34 // Direct wiring of ST Micro Nucleo boards to AZP690B02 (IQS620-EVAL-1 board)
AzqDev 23:2817d2f3145d 35 // [SDA,SCL,RDY] wired to Nucleo [CN10-5,CN10-3,CN10-33], [GND,3.3V] wired to Nucleo [CN11,CN7-16]
AzqDev 10:6fc446a71987 36
AzqDev 10:6fc446a71987 37
AzqDev 0:e20adaf21bb6 38 #include "mbed.h"
AzqDev 0:e20adaf21bb6 39 #include "IQS62x.h"
AzqDev 0:e20adaf21bb6 40 #include "IQSdisplayTerminal.h"
AzqDev 0:e20adaf21bb6 41
AzqDev 0:e20adaf21bb6 42 IQS62xDisplay terminal; // class to display IQS62x registers on a terminal
AzqDev 0:e20adaf21bb6 43 IQS62xIO iqs62x; // class for basic IQS62x block read and write
AzqDev 0:e20adaf21bb6 44
AzqDev 21:5e3955335251 45 int main() {
AzqDev 21:5e3955335251 46 terminal.helloMessage(false); // say hello but don't wait for a keypress
AzqDev 0:e20adaf21bb6 47 iqs62x.configure(); // configure the IC
AzqDev 24:4d6d4d7b919d 48 char * color = iqs62x.getTable(color_any_register_that_changed_in_the_previous_20_reads); // table that contains changes to register values
AzqDev 21:5e3955335251 49 while(1) {
AzqDev 15:fe9663c89c80 50 iqs62x.readIqsRegisters(0,NUMBER_OF_REGISTERS); // read all the registers
AzqDev 0:e20adaf21bb6 51 terminal.showStatus(iqs62x.I2Cspeed,iqs62x.I2CErrorCount); // show heading and number of I2C errors
AzqDev 21:5e3955335251 52 terminal.showRegisters(iqs62x.registers, color, false); // display registers, color the registers that changed
AzqDev 21:5e3955335251 53 }
AzqDev 0:e20adaf21bb6 54 }
AzqDev 0:e20adaf21bb6 55 // end of IQS624_HelloWorld.cpp