1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-20 14:54:31 +01:00

added a slight delay to loop in DigitalReadSerial example so we don't overload Serial Monitor

This commit is contained in:
Zach Eveland 2012-04-19 10:39:34 -04:00
parent c44329d732
commit 59f7f988d7

View File

@ -22,6 +22,7 @@ void loop() {
int buttonState = digitalRead(pushButton);
// print out the state of the button:
Serial.println(buttonState);
delay(1); // delay in between reads for stability
}