TOP Contributors

  1. MIKROE (2752 codes)
  2. Alcides Ramos (372 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139064 times)
  2. FAT32 Library (71593 times)
  3. Network Ethernet Library (56989 times)
  4. USB Device Library (47330 times)
  5. Network WiFi Library (43006 times)
  6. FT800 Library (42297 times)
  7. GSM click (29777 times)
  8. mikroSDK (27874 times)
  9. PID Library (26858 times)
  10. microSD click (26129 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

Cap Touch 5 click

Rating:

5

Author: MIKROE

Last Updated: 2019-10-18

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Capacitive

Downloaded: 2884 times

Not followed.

License: MIT license  

Cap Touch 5 Click is a capacitive touch sensing Click board which features the CY8CMBR3106S-LQXI CapSense® Express controller which enables advanced, yet easy-to-implement, capacitive touch sensing user interface solutions. It supports up to 16 capacitive sensing inputs, eliminates time-consuming firmware development.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Cap Touch 5 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Cap Touch 5 click" changes.

Do you want to report abuse regarding "Cap Touch 5 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

Cap Touch 5 click

Cap Touch 5 click

Native view of the Cap Touch 5 click board.

View full image
Cap Touch 5 click

Cap Touch 5 click

Front and back view of the Cap Touch 5 click board.

View full image

Library Description

The library covers all the necessary functions to control Cap Touch 5 Click.

Key functions:

  • void captouch5_config_sensors( uint16_t sens_data ) - Function for configuring sensor.
  • void captouch5_config_slider( uint8_t slider_data ) - Function for configuring slider.
  • void captouch5_read_button_status( T_CAPTOUCH5_BUTTONS *buttons ) - Function read button status.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes I2C module
  • Application Initialization - Initializes driver init, tests communication and configures device
  • Application Task - Waiting for touch sensor to detect something and then logs what is touched
void applicationTask(  )
{
    uint16_t temp_byte;
    uint16_t last_temp;
    uint8_t error_data;
    uint8_t temp_slider;

    state_check = 0;

    error_data = captouch5_process(  );

    if ( error_data == CAPTOUCH5_ERROR )
    {
        mikrobus_logWrite( "***** ERROR *****", _LOG_LINE );
        mikrobus_logWrite( " ", _LOG_LINE );
        mikrobus_logWrite( " ", _LOG_LINE );
        state_check = 1;
        return;
    }

    temp_byte = captouch5_read_slider_position(  );
    captouch5_read_button_status( &buttons );

    if ( temp_byte != last_temp )
    {
        mikrobus_logWrite( "Slider position value: ", _LOG_TEXT );
        WordToStr( temp_byte, demo_text );
        mikrobus_logWrite( demo_text, _LOG_LINE );
        mikrobus_logWrite( " ", _LOG_LINE );
        mikrobus_logWrite( " ", _LOG_LINE );
        last_temp = temp_byte;
        state_check = 1;
    }

    captouch5_read_buttons(  );

    Delay_ms ( 100 );

    if ( state_check == 1 )
    {
        mikrobus_logWrite( "--- Waiting for command ---", _LOG_LINE );
        mikrobus_logWrite( " ", _LOG_LINE );
        mikrobus_logWrite( " ", _LOG_LINE );
    }
}

Additional Functions :

  • _captouch5_readButtons() - Logs button press
  • _captouch5_deviceConfig() - Configures device

Note :

  • Click will go to sleep if doesn't get any command in 340ms
  • When you start device try restarting your board few times to start device

Other mikroE Libraries used in the example:

  • I2C
  • UART
  • Conversions

Additional notes and informations

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

Light 3 Click

0

Light 3 Click is a compact add-on board for precise ambient light measurement in automotive applications. This board features the OPT4003-Q1, an automotive-grade digital ambient light sensor from Texas Instruments. This digital ambient light sensor excels in detecting both visible and near-infrared light with high accuracy, thanks to its dual-channel functionality and filters that mimic the human eye's response while efficiently segregating NIR light.

[Learn More]

Buck Boost 2 Click

0

Buck-Boost 2 Click is an advanced DC-DC step-down/step-up regulator (buck/boost), which is able to provide regulated 5V on its output, regardless of the input voltage.

[Learn More]

Clock Gen 3 click

5

Clock Gen 3 Click features a low power self-contained digital frequency source providing a precision frequency from 1kHz to 68MHz, set through a serial port.

[Learn More]