TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 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 (136537 times)
  2. FAT32 Library (69730 times)
  3. Network Ethernet Library (55838 times)
  4. USB Device Library (46170 times)
  5. Network WiFi Library (41798 times)
  6. FT800 Library (40984 times)
  7. GSM click (28921 times)
  8. PID Library (26383 times)
  9. mikroSDK (26276 times)
  10. microSD click (25297 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: 4683 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

Breakout game - demo project

0

Game description: Breakout is an arcade game developed and published on May 13, 1976. - In Breakout, a layer of bricks lines the top third of the screen and the goal is to destroy them all. A ball moves straight around the screen, bouncing off the top and two sides of the screen. .......

[Learn More]

LED Ring 2 click

0

LED Ring 2 Click is a compact add-on board that provides a circular-shaped electronic lighting solution. This board features three I2C-configurable high-performance LED matrix drivers, the LP5862 from Texas Instruments. The LP5862 integrates 18 constant current sinks for driving 18 yellow LEDs. With the help of two additional LP5862 drivers, it is possible to realize, as shown on this board, a solution of 54 yellow LEDs arranged in a circular pattern. In addition, it also provides excellent PWM dimming effects.

[Learn More]

2x30W Amp click

5

2x30W Amp click is a class-D audio amplifier with a tremendous output power, considering its size and lack of huge heatsinks, usually associated with the audio amplifiers.

[Learn More]