mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
added a slight delay to loop in DigitalReadSerial example so we don't overload Serial Monitor
This commit is contained in:
@ -22,6 +22,7 @@ void loop() {
|
|||||||
int buttonState = digitalRead(pushButton);
|
int buttonState = digitalRead(pushButton);
|
||||||
// print out the state of the button:
|
// print out the state of the button:
|
||||||
Serial.println(buttonState);
|
Serial.println(buttonState);
|
||||||
|
delay(1); // delay in between reads for stability
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user