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: 2018-02-14
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Capacitive
Downloaded: 4908 times
Not followed.
License: MIT license
Cap Touch click is a capacitive touch sensing button, integrated on a click board. It can be activated by touch.
Do you want to subscribe in order to receive notifications regarding "Cap Touch click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Cap Touch click" changes.
Do you want to report abuse regarding "Cap Touch click".
Library Description
Initializes and defines GPIO driver and driver's functions. This function determines in which mode Cap Touch will works. The click can use a PWM library for setting the click in sync mode. Driver library also checks OUT pin state.
Key functions:
void captouch_setFastMode(void);- Function sets fast mode void captouch_setLowPowerMode(void);- Function sets low power mode uint8_t captouch_getOut(void);- Function gets state of OUT pin
Examples Description The demo application is composed of three sections:
void applicationTask()
{
uint8_t out = 0;
captouch_setFastMode();
//captouch_setLowPowerMode();
out = captouch_getOut();
if (out != 0)
{
mikrobus_logWrite( "Touch detected", _LOG_LINE );
}
}
Additional notes and information
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.