TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (352 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 (136710 times)
  2. FAT32 Library (69922 times)
  3. Network Ethernet Library (55936 times)
  4. USB Device Library (46258 times)
  5. Network WiFi Library (41884 times)
  6. FT800 Library (41146 times)
  7. GSM click (28979 times)
  8. PID Library (26410 times)
  9. mikroSDK (26355 times)
  10. microSD click (25353 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

Button POWER click

Rating:

5

Author: MIKROE

Last Updated: 2019-09-04

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Pushbutton/Switches

Downloaded: 2260 times

Not followed.

License: MIT license  

Button Power Click is a very interesting interactive gadget on a Click board. It is an integrated capacitive touch sensor display in the form of a button.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Button POWER click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Button POWER click" changes.

Do you want to report abuse regarding "Button POWER 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

Button POWER click

Button POWER click

Native view of the Button POWER click board.

View full image
Button POWER click

Button POWER click

Front and back view of the Button POWER click board.

View full image

Library Description

The library contains button check functions and LED control.

Key functions:

  • void buttonpower_set_led_state ( uint8_t led_state ) - Led control
  • uint8_t buttonpower_get_button_state ( void ) - Get button state

Examples description

The application is composed of three sections :

  • System Initialization - Initializes LOG, PWM pin as OUTPUT and INT pin as input
  • Application Initialization - Initializes GPIO driver init
  • Application Task - Checks if the button is pressed, if yes the led light flashes and the message is written on the usb uart
void applicationTask()
{
    uint8_t cnt;
    uint8_t button_state;
    
    button_state = buttonpower_get_button_state( );
    if ( button_state == BUTTONPOWER_BUTTON_IS_PRESSED )
    {
        mikrobus_logWrite( " >> Button is pressed ", _LOG_LINE );
        
        for ( cnt = 0; cnt < 5; cnt++ )
        {
            buttonpower_set_led_state( BUTTONPOWER_LED_OFF );
            Delay_ms( 100 );
            buttonpower_set_led_state( BUTTONPOWER_LED_ON );
            Delay_ms( 100 );
        }
    }
}

Other mikroE Libraries used in the example:

  • UART

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

Pressure 6 click

0

Pressure 6 Click features a simple, yet highly accurate and reliable pressure sensor labeled as BM1386GLV, produced by ROHM. This sensor is a piezo-resistive pressure sensor with internal thermal compensation, which greatly simplifies the pressure reading.

[Learn More]

TempHum 6 click

0

Temp&Hum 6 click is a smart temperature and humidity sensing click board™, packed with features that allow easy and simple integration into any design.

[Learn More]

Motion 3 click

0

Motion 3 Click is a Click board™ based on EKMC1606112, PIR motion sensor from Panasonic Corporation that's used as human motion detector. Also featured on Motion 3 Click bord is TLP241A photorelay from Toshiba that is used to provide a reinforced galvanic isolation for the external signals used to drive some external high power electronic equipment when motion is detected. It's allowing up to 40V between the SSR contacts in OFF state, and currents up to 2A while in ON state, thanks to a very low ON-state resistance. Motion 3 Click board™ is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.

[Learn More]