TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (382 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139725 times)
  2. FAT32 Library (72111 times)
  3. Network Ethernet Library (57322 times)
  4. USB Device Library (47671 times)
  5. Network WiFi Library (43289 times)
  6. FT800 Library (42625 times)
  7. GSM click (29960 times)
  8. mikroSDK (28383 times)
  9. PID Library (26977 times)
  10. microSD click (26380 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

Touchpad 4 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.15

mikroSDK Library: 2.0.0.0

Category: Capacitive

Downloaded: 225 times

Not followed.

License: MIT license  

Touchpad 4 Click is a compact add-on board that easily integrates projected capacitive touch into user's applications. This board features the IQS7211A, a tiny capacitive touch controller from Azoteq.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Touchpad 4 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Touchpad 4 Click" changes.

Do you want to report abuse regarding "Touchpad 4 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Touchpad 4 Click

Touchpad 4 Click is a compact add-on board that easily integrates projected capacitive touch into user's applications. This board features the IQS7211A, a tiny capacitive touch controller from Azoteq.

touchpad_4_click.png

Click Product page


Click library

  • Author : Luka Filipovic
  • Date : Jun 2021.
  • Type : I2C type

Software Support

We provide a library for the Touchpad4 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for Touchpad4 Click driver.

Standard key functions :

  • touchpad4_cfg_setup Config Object Initialization function.

    void touchpad4_cfg_setup ( touchpad4_cfg_t *cfg );
  • touchpad4_init Initialization function.

    err_t touchpad4_init ( touchpad4_t *ctx, touchpad4_cfg_t *cfg );
  • touchpad4_default_cfg Click Default Configuration function.

    err_t touchpad4_default_cfg ( touchpad4_t *ctx );

Example key functions :

  • touchpad4_reset Reset function.

    void touchpad4_reset ( touchpad4_t *ctx );
  • touchpad4_get_touch Read touch informations.

    err_t touchpad4_get_touch ( touchpad4_t *ctx, touchpad4_info_t *touch_info );
  • touchpad_get_channels Read channel information.

    err_t touchpad_get_channels ( touchpad4_t *ctx, uint32_t *channels );

Example Description

This example showcases ability of the device to read touch coordinates, active/inactive channels, and gesture informations.

The demo application is composed of two sections :

Application Init

Initialize host communication modules(UART and I2C) and additional pins, for device control. Then resets device and set default configuration where Channels and pins are mapped and configured, and set communication with device only on touch/event. In the end one of 3 examples is set;


void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    touchpad4_cfg_t touchpad4_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    touchpad4_cfg_setup( &touchpad4_cfg );
    TOUCHPAD4_MAP_MIKROBUS( touchpad4_cfg, MIKROBUS_1 );
    err_t init_flag = touchpad4_init( &touchpad4, &touchpad4_cfg );
    if ( I2C_MASTER_ERROR == init_flag ) 
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }

    touchpad4_reset( &touchpad4 );

    init_flag = touchpad4_default_cfg ( &touchpad4 );
    if ( TOUCHPAD4_ERROR == init_flag ) 
    {
        log_error( &logger, " Configuration. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }

    example_selector = TOUCHPAD4_EXAMPLE_TOUCH;

    log_info( &logger, " Application Task " );
}

Application Task

There are 3 examples that shocaes ability of the device:

  • Reading touch coorinates and addinal informations of touch strength, and touch area and logging them,
  • Reading channel statuses and show them by logging them,
  • Reading gesture events and logging them;

void application_task ( void ) 
{
    if ( !touchpad4_get_ready( &touchpad4 ) )
    {
        switch ( example_selector )
        {
            case TOUCHPAD4_EXAMPLE_TOUCH:
            {
                touchpad4_touch_reading( );
                break;
            }
            case TOUCHPAD4_EXAMPLE_CHANNEL:
            {
                touchpad4_channel_reading( );
                break;
            }
            case TOUCHPAD4_EXAMPLE_GESTURE:
            {
                touchpad4_gesture_reading( );
                break;
            }
            default:
            {
                log_error( &logger, " Select Example" );
                break;
            }
        } 
    }
}

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.Touchpad4

Additional notes and informations

Depending on the development board you are using, you may need USB UART Click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.


ALSO FROM THIS AUTHOR

UWB Click

0

UWB Click is an Ultra-Wideband transceiver Click board™ that can be used in 2-way ranging or TDOA location systems to locate assets to a precision of 10 cm and supports data rates of up to 6.8 Mbps. This Click board™ features the DWM1000 module based on Decawave's DW1000 Ultra-Wideband (UWB) transceiver from Decawave Limited.

[Learn More]

Light mix-sens Click

0

Light mix-sens Click is carrying TMD37253, an advanced proximity measurement, color sense (RGBC+IR), and digital ambient light sensing (ALS) device. The TMD37253 slim module package has been designed to accommodate a “single hole” aperture approach that incorporates an IR LED and factory calibrated LED driver. The proximity detection feature provides object detection (e.g., mobile device screen to the user’s ear) by photodiode detection of reflected IR energy (sourced by the integrated LED). The ALS detection feature provides photopic light intensity data. The color photodiodes have UV and IR blocking filters and a dedicated data converters producing 16-bit data.

[Learn More]

GPS 3 Click

0

GPS3 Click carries Quectel’s L80 GPS module, a high-sensitivity ultra slim GPS module with a patch antenna.

[Learn More]