Fixed error in StateChangeDetection example

This commit is contained in:
Tom Igoe 2009-12-30 18:03:57 +00:00
parent b4402e1e26
commit 884ec6f242
1 changed files with 3 additions and 1 deletions

View File

@ -16,7 +16,7 @@
most Arduino boards)
created 27 Sep 2005
modified 17 Jun 2009
modified 30 Dec 2009
by Tom Igoe
http://arduino.cc/en/Tutorial/ButtonStateChange
@ -35,6 +35,8 @@ int lastButtonState = 0; // previous state of the button
void setup() {
// initialize the button pin as a input:
pinMode(buttonPin, INPUT);
// initialize the LED as an output:
pinMode(ledPin, OUTPUT);
// initialize serial communication:
Serial.begin(9600);
}