TOP Contributors

  1. MIKROE (2652 codes)
  2. Alcides Ramos (351 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 (136609 times)
  2. FAT32 Library (69810 times)
  3. Network Ethernet Library (55881 times)
  4. USB Device Library (46214 times)
  5. Network WiFi Library (41857 times)
  6. FT800 Library (41070 times)
  7. GSM click (28942 times)
  8. PID Library (26400 times)
  9. mikroSDK (26309 times)
  10. microSD click (25325 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

Analog Key click

Rating:

5

Author: MIKROE

Last Updated: 2019-02-21

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Measurements

Downloaded: 3002 times

Not followed.

License: MIT license  

Analog Key Click is an analog keyboard on a Click board. It contains six tactile pushbuttons, used to select one of six different voltage levels.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Analog Key click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Analog Key click" changes.

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

Analog Key click

Analog Key click

Native view of the Analog Key click board.

View full image
Analog Key click

Analog Key click

Front and back view of the Analog Key click board.

View full image

Library Description

The library contains a function which, based on the ADC value, detects which button is pressed.

Key functions:

  • uint8_t analogkey_getKey(uint16_t adcValue) - Detects which button is pressed.

Examples description

The application is composed of the three sections :

  • System Initialization - LOG initialization for displaying data on USB UART.
  • Application Initialization - Initializes ADC init.
  • Application Task - (code snippet) - Reads ADC value and detects which button is pressed based on that value.
void applicationTask()
{
    uint16_t ADC_value;
    uint8_t isKey;
    char demoText[ 50 ];
    uint8_t cnt;
    uint16_t sumValue = 0;
    
    for(cnt = 0; cnt < 5; cnt++)
    {
        ADC_value = analogkey_adcRead();
        sumValue += ADC_value;
        Delay_10ms();
    }
    ADC_value = sumValue / 5;
    isKey = analogkey_getKey(ADC_value);
    
    if(isKey != _ANALOGKEY_NO_TOUCH)
    {
        IntToStr(isKey, demoText);
        mikrobus_logWrite("Pressed the button : ", _LOG_TEXT);
        mikrobus_logWrite(demoText, _LOG_LINE);
    }
    Delay_ms( 300 );
}

Other mikroE Libraries used in the example:

  • ADC
  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB UART 2 clickor 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

BLE 3 click

0

BLE 3 click is a Bluetooth Low Energy radio module which carries u-blox's NINA-B1 radio. The click can communicate with a target MCU through UART, SPI or I2C.

[Learn More]

EnOcean Click

1

EnOcean click carries a TCM310 transceiver, which is a bidirectional gateway for EnOcean’s 868 MHz radio systems. The click is designed to run on a 3.3V power supply. It communicates with the target MCU through UART (TX, RX pins), with additional functionality provided by RST and EN pins.

[Learn More]

Cap Extend 3 click

5

Cap Extend 3 click features four capacitive sensor pads integrated on the PCB, that can sense touch through a variety of different materials.

[Learn More]