Skip to content

Commit 59f7f98

Browse files
committed
added a slight delay to loop in DigitalReadSerial example so we don't overload Serial Monitor
1 parent c44329d commit 59f7f98

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ void loop() {
2222
int buttonState = digitalRead(pushButton);
2323
// print out the state of the button:
2424
Serial.println(buttonState);
25+
delay(1); // delay in between reads for stability
2526
}
2627

2728

0 commit comments

Comments
 (0)