TOP Contributors

  1. MIKROE (2662 codes)
  2. Alcides Ramos (357 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137031 times)
  2. FAT32 Library (70159 times)
  3. Network Ethernet Library (56033 times)
  4. USB Device Library (46355 times)
  5. Network WiFi Library (41970 times)
  6. FT800 Library (41299 times)
  7. GSM click (29073 times)
  8. mikroSDK (26514 times)
  9. PID Library (26452 times)
  10. microSD click (25441 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

TouchKey 3 click

Rating:

5

Author: MIKROE

Last Updated: 2018-03-13

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Capacitive

Downloaded: 4793 times

Not followed.

License: MIT license  

TouchKey 3 click is equipped with advanced capacitive sensors, based on the proprietary QTouch technology, that can be used to sense touch on 7 different keys.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "TouchKey 3 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "TouchKey 3 click" changes.

Do you want to report abuse regarding "TouchKey 3 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

TouchKey 3 click

TouchKey 3 click

Native view of the TouchKey 3 Click board.

View full image
TouchKey 3 click

TouchKey 3 click

Fron and back view of the TouchKey 3 Click board.

View full image

Library Description

The library contains functions that communicate with TouchKey 3 click via SPI interface. It covers all the modes of communication with the click that are available.

Key functions

uint8_t touchkey3_sendCommand(uint8_t command) - Sends a command to TouchKey 3 click

uint8_t touchkey3_sendRequest(uint8_t request, uint8_t * pResponse) - Retrieves a response to a request from TouchKey 3 click

uint8_t touchkey3_setData(uint8_t dataAddress, uint8_t writeData) - Writes data into configuration registers

Examples Description

The demo application is composed of three sections:

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization - Initializes click driver and performs a soft reset of the click.
  • Application Task - (Code snippet) - Reads the status of the keys and outputs a message if a key is touched.
void applicationTask()
{
    uint8_t returnData[ 2 ];
    uint8_t counter;
    uint8_t temp;
    uint8_t text[ 20 ] = { 0 };

    touchkey3_sendRequest( _TOUCHKEY3_REQ_ALL_KEYS, &returnData );

    for (counter = 0; counter < 7; counter++)
    {
        if ((returnData[1] >> counter) & 0x01)
        {
            mikrobus_logWrite( "Touch detected on key ", _LOG_TEXT );
            //Converts the key index into ascii character ( 0 - 7 -> '1' - '7')
            temp = counter + 49;
            WordToStr( temp, text );
            mikrobus_logWrite( text, _LOG_TEXT );
            mikrobus_logWrite( ".", _LOG_LINE );
            Delay_ms( 1000 );
        }
    }
    Delay_ms( 200 );
}

Other MikroElektronika libraries used in the example:

  • UART

Additional notes and information

Depending on the development board you are using, you may need USB UART clickUSB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

ALSO FROM THIS AUTHOR

Hall Current 18 click

0

Hall Current 18 Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the MCS1806, an isolated Hall-effect current sensor from MPS. The sensor is immune to external magnetic fields via differential sensing and has no magnetic hysteresis. The MCS1806 features galvanic isolation between the pins of the primary conductive path and the sensor leads, allowing it to replace optoisolators and other isolation devices.

[Learn More]

M-BUS RF 2 click

0

M-BUS RF 2 Click is a compact add-on board designed for utility metering and various telemetry applications. This board features the Metis-I (2605041183000), an 868MHz radio module from Würth Elektronik. It integrates an MSP430 microcontroller and a CC1101 RF chip-set to ensure efficient data transmission. Key features include a frequency range of 868.3MHz to 869.525MHz, support for the Wireless M-BUS EN13757-4:2013 and Open Metering System (OMS) standards, and communication capabilities up to 700 meters in clear conditions.

[Learn More]

POT 3 click

6

POT 3 Click is a Click board with the accurate selectable reference voltage output. By employing a high-quality 11mm, metal shaft potentiometer, this Click board can provide very accurate voltage output.

[Learn More]