Skip to content

Commit a591471

Browse files
author
SimonePDA
authored
Merge pull request #215 from per1234/ifSerial-comments
Update/add comments explaining the purpose of while(!Serial) in examples
2 parents 9aa7481 + f5957e6 commit a591471

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Language/Functions/Communication/Serial/ifSerial.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void setup() {
6868
//Initialize serial and wait for port to open:
6969
Serial.begin(9600);
7070
while (!Serial) {
71-
; // wait for serial port to connect. Needed for Leonardo only
71+
; // wait for serial port to connect. Needed for native USB
7272
}
7373
}
7474

Language/Variables/Data Types/String/Functions/reserve.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void setup() {
5656
// initialize serial and wait for port to open:
5757
Serial.begin(9600);
5858
while (!Serial) {
59-
; // wait for serial port to connect. Needed for Leonardo only
59+
; // wait for serial port to connect. Needed for native USB
6060
}
6161
6262
myString.reserve(26);

Language/Variables/Utilities/PROGMEM.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ char myChar;
7777
7878
void setup() {
7979
Serial.begin(9600);
80-
while (!Serial);
80+
while (!Serial); // wait for serial port to connect. Needed for native USB
8181
8282
// put your setup code here, to run once:
8383
// read back a 2-byte int
@@ -144,7 +144,7 @@ char buffer[30]; // make sure this is large enough for the largest string it
144144
void setup()
145145
{
146146
Serial.begin(9600);
147-
while(!Serial);
147+
while(!Serial); // wait for serial port to connect. Needed for native USB
148148
Serial.println("OK");
149149
}
150150

0 commit comments

Comments
 (0)