AbleButtons V0.4.0
Lightweight button library for Arduino.
 
Loading...
Searching...
No Matches
Holdable.ino File Reference

Example button hold control from an Able button. More...

#include <AbleButtons.h>

Go to the source code of this file.

Macros

#define BUTTON_PIN   2
 Connect button between this pin and ground. More...
 

Typedefs

using Button = AblePullupButton
 Using basic pull-up button. More...
 
using ButtonList = AblePullupButtonList
 Using basic pull-up button list. More...
 

Functions

void setup ()
 Setup the Debouncable example. More...
 
void loop ()
 Control the Debouncable example. More...
 

Variables

Button btn (BUTTON_PIN)
 The button to check.
 

Detailed Description

Example button hold control from an Able button.

The built-in LED lights up when a button connected between pin 2 and ground is held down for 2 seconds or more. It uses the internal pull-up resistor within an Arduino for the simplest button connection.

Definition in file Holdable.ino.

Macro Definition Documentation

◆ BUTTON_PIN

#define BUTTON_PIN   2

Connect button between this pin and ground.

Definition at line 16 of file Holdable.ino.

Typedef Documentation

◆ Button

Using basic pull-up button.

Definition at line 13 of file Holdable.ino.

◆ ButtonList

Using basic pull-up button list.

Definition at line 14 of file Holdable.ino.

Function Documentation

◆ loop()

void loop ( )

Control the Debouncable example.

Called repeatedly in a loop.

Definition at line 34 of file Holdable.ino.

◆ setup()

void setup ( )

Setup the Debouncable example.

Called once to initialise everything.

Definition at line 22 of file Holdable.ino.