1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Fixed error in StateChangeDetection example

This commit is contained in:
Tom Igoe
2009-12-30 18:03:57 +00:00
parent b4402e1e26
commit 884ec6f242

View File

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