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

main.cpp

Committer:
AzqDev
Date:
2017-02-06
Revision:
2:e9eaa3dbe569
Parent:
0:e20adaf21bb6
Child:
3:956d9eac7af5

File content as of revision 2:e9eaa3dbe569:

// IQS624-HelloWorld.cpp

// Hello World program for Azoteq IQS624 ultra low power sensor for 2D magnetic angle, capacitive touch and inductive proximity sensor.

// 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.

// Output is via the USB debug serial port to a terminal program

// Tested on the following MBED hardware - mostly using Azoteq-to-Arduino Adapter Boards
// Note: When compiling for new hardware, use "Compile All" to rebuild everything
//  1. ST Micro Nucleo-L152RE   Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690002
//  2. ST Micro Nucleo-F401RE   Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690002
//  3. ST Micro Nucleo-L476RG   Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690002
//  4. ST Micro Nucleo-L053R8   Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690002
//  5. ST Micro Nucleo-F446RE   Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690002
//  6. ST Micro Disco-F746NG    Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690002
//  7. Freescale FRDM-KL46Z     Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690002
//  8. Freescale FRDM-KL25Z     Azoteq Adapter Boards: AZP675E02, AZP694A02, AZP690002
//  9. mbed LPC1768             Azoteq adapter AZP690002 [SDA,SCL,RDY] wired to LPC11U24 [p28,p27,p26]
// 10. mbed LPC11U24            Azoteq adapter AZP690002 [SDA,SCL,RDY] wired to LPC11U24 [p28,p27,p26]

#include "mbed.h"
#include "IQS62x.h"
#include "IQSdisplayTerminal.h"

IQS62xDisplay terminal;   // class to display IQS62x registers on a terminal
IQS62xIO iqs62x;          // class for basic IQS62x block read and write

int main() {
    terminal.helloMessage(false); // say hello and don't wait for user keypress to continue
    iqs62x.configure(); // configure the IC
    while(1) {
        iqs62x.readAll(); // read all the registers
        terminal.showStatus(iqs62x.I2Cspeed,iqs62x.I2CErrorCount); // show heading and number of I2C errors
        terminal.showRegisters(iqs62x.registers); // show IQS62x registers
    }
}

// end of IQS624_HelloWorld.cpp