TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (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 (136537 times)
  2. FAT32 Library (69732 times)
  3. Network Ethernet Library (55842 times)
  4. USB Device Library (46176 times)
  5. Network WiFi Library (41801 times)
  6. FT800 Library (40987 times)
  7. GSM click (28922 times)
  8. PID Library (26384 times)
  9. mikroSDK (26280 times)
  10. microSD click (25298 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

SAML Touch click

Rating:

5

Author: MIKROE

Last Updated: 2019-02-27

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Capacitive

Downloaded: 3284 times

Not followed.

License: MIT license  

SAML Touch Click is a Click board equipped with two capacitive touchpads and one capacitive slider.

No Abuse Reported

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".

  • 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

SAML Touch click

SAML Touch click

Native view of the SAML Touch click board.

View full image
SAML Touch click

SAML Touch click

Front and back view of the SAML Touch click board.

View full image

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 receives

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes UART used for the communcation with SAML Touch module and UART used for infromation logging.
  • Application Initialization - Initializes driver init and timer init.
  • Application Task - running in parallel core state machine. Check that the button 1 or button 2 or the active slider is pressed. If it detects that the buttons 1 or 2 are pressed, it logs a button detection message. If it detects that the slider is active, it logs a message that the slider is active and its current position is 0-255.
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 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

Touchpad 4 click

0

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.

[Learn More]

DC Motor 20 click

0

DC Motor 20 Click is a compact add-on board that contains a brushed DC motor driver. This board features the TC78H651AFNG, a dual H-bridge driver for one or two DC brushed motors, which incorporates DMOS with low ON resistance in output transistors from Toshiba Semiconductor.

[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]