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-02-27
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Capacitive
Downloaded: 3859 times
Not followed.
License: MIT license
SAML Touch Click is a Click board equipped with two capacitive touchpads and one capacitive slider.
Do you want to subscribe in order to receive notifications regarding "SAML Touch click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "SAML Touch click" changes.
Do you want to report abuse regarding "SAML Touch click".
Library Description
The library includes function sets the volume for the selected channel, uses two variables or one volume variable. The user has a function for mute/unmute sounds, default settings and function for clears all registers.
Key functions:
void samltouch_parser(char *dataIn, samltouch_state_T *state)
- The function parses the response it receivesExamples description
The application is composed of the three sections :
void applicationTask()
{
// CORE STATE MACHINE
samltouch_process();
if(timerCounter > 100)
{
if(SAML_Touch.button2 == 1)
{
mikrobus_logWrite( "Button 2 is pressed.", _LOG_LINE );
}
else if(SAML_Touch.button1 == 1)
{
mikrobus_logWrite( "Button 1 is pressed.", _LOG_LINE );
}
timerCounter = 0;
}
if(SAML_Touch.sw_state == 1)
{
mikrobus_logWrite( "Slider is active.", _LOG_LINE );
if(SAML_Touch.sw_pos != 0)
{
mikrobus_logWrite( "Slider position is ", _LOG_TEXT );
IntToStr(SAML_Touch.sw_pos, demoText);
mikrobus_logWrite( demoText, _LOG_LINE );
}
}
}
Additional Functions :
All additional functions such as timer initialization and default handler.
Other mikroE Libraries used in the example:
String
UART
Conversions
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.