TOP Contributors

  1. MIKROE (2639 codes)
  2. Alcides Ramos (347 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 (136094 times)
  2. FAT32 Library (69395 times)
  3. Network Ethernet Library (55671 times)
  4. USB Device Library (45938 times)
  5. Network WiFi Library (41607 times)
  6. FT800 Library (40699 times)
  7. GSM click (28760 times)
  8. PID Library (26312 times)
  9. mikroSDK (25990 times)
  10. microSD click (25089 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: 4626 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

iqRF click

0

IQRF Click carries the RF transceiver, operating in the 868/916 MHz frequency.

[Learn More]

ISO ADC 3 click

0

ISO ADC 3 Click is a compact add-on board that contains a single-channel precision isolation amplifier. This board features the AMC1100, a precision isolation amplifier with an output separated from the input circuitry by a silicon dioxide barrier that is highly resistant to magnetic interference from Texas Instruments.

[Learn More]

Fan click

0

Fan Click carries an EMC2301 controller for powering and regulating the operation of 5V four-wire fans, which are commonly utilized as coolers in computers and other electronics.

[Learn More]