Skip to content

Commit

Permalink
Some typos fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathertel committed Jan 23, 2014
1 parent d4698d2 commit 7dca076
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions OneButton.cpp
Expand Up @@ -9,6 +9,7 @@
// 02.10.2010 created by Matthias Hertel
// 21.04.2011 support of active LOW and active HIGH button signal input.
// 01.12.2011 include file changed to work with the Arduino 1.0 environment
// 12.01.2014 some typos fixed.
// -----

#include "OneButton.h"
Expand All @@ -21,15 +22,15 @@ OneButton::OneButton(int pin, int activeLow)
_pin = pin;

_clickTicks = 600; // number of millisec that have to pass by before a click is detected.
_pressTicks = 1000; // number of millisec that have to pass by before a lonn button press is detected.
_pressTicks = 1000; // number of millisec that have to pass by before a long button press is detected.

_state = 0; // starting with state 0: waiting for button to be pressed

if (activeLow) {
// button connects ground to the pin when pressed.
_buttonReleased = HIGH; // notPressed
_buttonPressed = LOW;
digitalWrite(pin, HIGH); // turn on pulldown resistor
digitalWrite(pin, HIGH); // turn on pullUp resistor

} else {
// button connects VCC to the pin when pressed.
Expand Down

0 comments on commit 7dca076

Please sign in to comment.