Added BouncySwitch images and changed BOUNCE_RAPID_FIRE for BOUNCE_LOCK-OUT
This commit is contained in:
+2
-2
@@ -18,7 +18,7 @@ Bounce::Bounce() {
|
||||
void Bounce::attach(int pin) {
|
||||
this->pin = pin;
|
||||
debouncedState = unstableState = digitalRead(pin);
|
||||
#ifdef BOUNCE_RAPID_FIRE
|
||||
#ifdef BOUNCE_LOCK-OUT
|
||||
previous_millis = 0;
|
||||
#else
|
||||
previous_millis = millis();
|
||||
@@ -37,7 +37,7 @@ void Bounce::interval(unsigned long interval_millis)
|
||||
bool Bounce::update()
|
||||
{
|
||||
|
||||
#ifdef BOUNCE_RAPID_FIRE
|
||||
#ifdef BOUNCE_LOCK-OUT
|
||||
|
||||
// Ignore everything if we are locked out
|
||||
if (millis() - previous_millis >= interval_millis) {
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
// Uncomment the following line for "rapid fire" mode
|
||||
//#define BOUNCE_RAPID_FIRE
|
||||
//#define BOUNCE_LOCK-OUT
|
||||
|
||||
|
||||
#ifndef Bounce_h
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.7 KiB |
Reference in New Issue
Block a user