Skip to content

Commit a8a2a99

Browse files
novskihobinjk
authored andcommitted
add wait for serial before printing
1 parent 3603a5a commit a8a2a99

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/LED/LED.ino

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ void setup(void){
3535
pinMode(ledPin, OUTPUT);
3636
digitalWrite(ledPin, HIGH);
3737
Serial.begin(115200);
38+
while (!Serial) {
39+
; // wait for serial port to connect. Needed for native USB port only
40+
}
3841
Serial.println("");
3942
Serial.print("Connecting to \"");
4043
Serial.print(ssid);
@@ -83,4 +86,3 @@ void loop(void){
8386
}
8487
lastOn = on;
8588
}
86-

0 commit comments

Comments
 (0)