Skip to content

Commit f6b9e9c

Browse files
joeybab3me-no-dev
authored andcommitted
Clarified comments and debug messages in WiFiClient Example (#2389)
* Clarified comments and debug messages Made debug messages and comments easier to understand/grammatical fixes * few more fixes
1 parent fc737e0 commit f6b9e9c

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

Diff for: libraries/WiFi/examples/WiFiClientBasic/WiFiClientBasic.ino

+9-11
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void setup()
1818

1919
Serial.println();
2020
Serial.println();
21-
Serial.print("Wait for WiFi... ");
21+
Serial.print("Waiting for WiFi... ");
2222

2323
while(WiFiMulti.run() != WL_CONNECTED) {
2424
Serial.print(".");
@@ -39,32 +39,30 @@ void loop()
3939
const uint16_t port = 80;
4040
const char * host = "192.168.1.1"; // ip or dns
4141

42-
43-
44-
Serial.print("connecting to ");
42+
Serial.print("Connecting to ");
4543
Serial.println(host);
4644

4745
// Use WiFiClient class to create TCP connections
4846
WiFiClient client;
4947

5048
if (!client.connect(host, port)) {
51-
Serial.println("connection failed");
52-
Serial.println("wait 5 sec...");
49+
Serial.println("Connection failed.");
50+
Serial.println("Waiting 5 seconds before retrying...");
5351
delay(5000);
5452
return;
5553
}
5654

57-
// This will send the request to the server
58-
client.print("Send this data to server");
55+
// This will send a request to the server
56+
client.print("Send this data to the server");
5957

60-
//read back one line from server
58+
//read back one line from the server
6159
String line = client.readStringUntil('\r');
6260
client.println(line);
6361

64-
Serial.println("closing connection");
62+
Serial.println("Closing connection.");
6563
client.stop();
6664

67-
Serial.println("wait 5 sec...");
65+
Serial.println("Waiting 5 seconds before restarting...");
6866
delay(5000);
6967
}
7068

0 commit comments

Comments
 (0)