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]
Rating:
Author: MIKROE
Last Updated: 2019-10-18
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Capacitive
Downloaded: 3071 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.
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".
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 :
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 :
Note :
Other mikroE Libraries used in the example:
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.