More delays in serial examples to avoid crashing serial monitor

This commit is contained in:
Tom Igoe 2012-04-09 10:48:33 -04:00
parent bde00b9be9
commit 0cdc7e59c6
2 changed files with 2 additions and 0 deletions

View File

@ -12,4 +12,5 @@ void setup() {
void loop() {
int sensorValue = analogRead(A0);
Serial.println(sensorValue);
delay(1); // delay in between reads for stability
}

View File

@ -13,6 +13,7 @@ void setup() {
void loop() {
int sensorValue = digitalRead(2);
Serial.println(sensorValue);
delay(1); // short delay in between reads for stability
}