Moving Button to Bounce2 namespace

This commit is contained in:
Thomas O Fredericks
2021-01-23 18:05:58 -05:00
parent eb5ab9fad8
commit 5a481c6922
99 changed files with 2016 additions and 438 deletions
+10 -6
View File
@@ -2,10 +2,14 @@
/*
DESCRIPTION
====================
Pressing a physical button switches a LED on or off.
Simple example of the Button class from the Bounce library.
The Button class matches an electrical state to a physical action
with <Button>.setPressedState(LOW or HIGH).
This is an example of the Bounce2::Button class.
When the user presses a physical button, it toggles a LED on or off.
The Button class matches an electrical state to a physical action.
Use .setPressedState(LOW or HIGH) to set the detection state for when the button is pressed.
INSCRUCTIONS
====================
Set BUTTON_PIN to the pin attached to the button.
Set LED_PIN to the pin attached to a LED.
@@ -25,8 +29,8 @@
// https://github.com/thomasfredericks/Bounce2
#include <Bounce2.h>
// INSTANTIATE A Button OBJECT
Button button = Button();
// INSTANTIATE A Button OBJECT FROM THE Bounce2 NAMESPACE
Bounce2::Button button = Bounce2::Button();