Skip to content

Commit 0cdc7e5

Browse files
author
Tom Igoe
committed
More delays in serial examples to avoid crashing serial monitor
1 parent bde00b9 commit 0cdc7e5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Diff for: build/shared/examples/01.Basics/AnalogReadSerial/AnalogReadSerial.ino

+1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ void setup() {
1212
void loop() {
1313
int sensorValue = analogRead(A0);
1414
Serial.println(sensorValue);
15+
delay(1); // delay in between reads for stability
1516
}

Diff for: build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ void setup() {
1313
void loop() {
1414
int sensorValue = digitalRead(2);
1515
Serial.println(sensorValue);
16+
delay(1); // short delay in between reads for stability
1617
}
1718

1819

0 commit comments

Comments
 (0)