Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 6dd9b07

Browse files
authored
v1.5.4 to update examples
### Releases v1.5.4 1. Use new `arduino.tips` instead of `arduino.cc`. 2. Improve examples 3. Update `Packages' Patches`
1 parent 9be186e commit 6dd9b07

File tree

34 files changed

+99
-137
lines changed

34 files changed

+99
-137
lines changed

examples/AdvancedWebServer/AdvancedWebServer.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,10 @@ void setup()
233233
digitalWrite(led, 0);
234234

235235
Serial.begin(115200);
236-
while (!Serial);
236+
while (!Serial && millis() < 5000);
237237

238-
Serial.print(F("\nStarting AdvancedServer on "));
239-
Serial.print(BOARD_NAME);
240-
Serial.print(F(" with "));
241-
Serial.println(SHIELD_TYPE);
238+
Serial.print(F("\nStarting AdvancedServer on ")); Serial.print(BOARD_NAME);
239+
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
242240
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
243241

244242
// initialize serial for ESP module

examples/AdvancedWebServer_STM32/AdvancedWebServer_STM32.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,10 @@ void setup()
178178
digitalWrite(led, 0);
179179

180180
Serial.begin(115200);
181-
while (!Serial);
181+
while (!Serial && millis() < 5000);
182182

183-
Serial.print(F("\nStarting AdvancedWebServer_STM32 on "));
184-
Serial.print(BOARD_NAME);
185-
Serial.print(F(" with "));
186-
Serial.println(SHIELD_TYPE);
183+
Serial.print(F("\nStarting AdvancedWebServer_STM32 on ")); Serial.print(BOARD_NAME);
184+
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
187185
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
188186

189187
// initialize serial for ESP module

examples/AdvancedWebServer_STM32/defines.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ define EspSerial Serial3
350350

351351
#include <ESP8266_AT_WebServer.h>
352352

353-
char ssid[] = "****"; // your network SSID (name)
354-
char pass[] = "****"; // your network password
353+
char ssid[] = "YOUR_SSID"; // your network SSID (name)
354+
char pass[] = "12345678"; // your network password
355355

356356
#endif //defines_h

examples/ConnectWPA/ConnectWPA.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,10 @@ void printCurrentNet()
8484
void setup()
8585
{
8686
Serial.begin(115200);
87-
while (!Serial);
87+
while (!Serial && millis() < 5000);
8888

89-
Serial.print(F("\nStarting ConnectWPA on "));
90-
Serial.print(BOARD_NAME);
91-
Serial.print(F(" with "));
92-
Serial.println(SHIELD_TYPE);
89+
Serial.print(F("\nStarting ConnectWPA on ")); Serial.print(BOARD_NAME);
90+
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
9391
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
9492

9593
// initialize serial for ESP module

examples/ConnectWPA/defines.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@
389389

390390
#include <ESP8266_AT_WebServer.h>
391391

392-
char ssid[] = "****"; // your network SSID (name)
393-
char pass[] = "****"; // your network password
392+
char ssid[] = "YOUR_SSID"; // your network SSID (name)
393+
char pass[] = "12345678"; // your network password
394394

395395
#endif //defines_h

examples/HelloServer/HelloServer.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,10 @@ void setup()
102102
{
103103
// Open serial communications and wait for port to open:
104104
Serial.begin(115200);
105-
while (!Serial);
105+
while (!Serial && millis() < 5000);
106106

107-
Serial.print(F("\nStarting HelloServer on "));
108-
Serial.print(BOARD_NAME);
109-
Serial.print(F(" with "));
110-
Serial.println(SHIELD_TYPE);
107+
Serial.print(F("\nStarting HelloServer on ")); Serial.print(BOARD_NAME);
108+
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
111109
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
112110

113111
// initialize serial for ESP module

examples/HelloServer2/HelloServer2.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,10 @@ void setup()
105105

106106
// Open serial communications and wait for port to open:
107107
Serial.begin(115200);
108-
while (!Serial);
108+
while (!Serial && millis() < 5000);
109109

110-
Serial.print(F("\nStarting HelloServer2 on "));
111-
Serial.print(BOARD_NAME);
112-
Serial.print(F(" with "));
113-
Serial.println(SHIELD_TYPE);
110+
Serial.print(F("\nStarting HelloServer2 on ")); Serial.print(BOARD_NAME);
111+
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
114112
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
115113

116114
// initialize serial for ESP module

examples/HelloServer2/defines.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@
389389

390390
#include <ESP8266_AT_WebServer.h>
391391

392-
char ssid[] = "****"; // your network SSID (name)
393-
char pass[] = "****"; // your network password
392+
char ssid[] = "YOUR_SSID"; // your network SSID (name)
393+
char pass[] = "12345678"; // your network password
394394

395395
#endif //defines_h

examples/HttpBasicAuth/HttpBasicAuth.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,10 @@ const char* www_username = "admin";
5151
void setup()
5252
{
5353
Serial.begin(115200);
54-
while (!Serial);
54+
while (!Serial && millis() < 5000);
5555

56-
Serial.print(F("\nStarting HTTPBasicAuth on "));
57-
Serial.print(BOARD_NAME);
58-
Serial.print(F(" with "));
59-
Serial.println(SHIELD_TYPE);
56+
Serial.print(F("\nStarting HTTPBasicAuth on ")); Serial.print(BOARD_NAME);
57+
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
6058
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
6159

6260
// initialize serial for ESP module

examples/HttpBasicAuth/defines.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@
389389

390390
#include <ESP8266_AT_WebServer.h>
391391

392-
char ssid[] = "****"; // your network SSID (name)
393-
char pass[] = "****"; // your network password
392+
char ssid[] = "YOUR_SSID"; // your network SSID (name)
393+
char pass[] = "12345678"; // your network password
394394

395395
#endif //defines_h

examples/MQTTClient_Auth/MQTTClient_Auth.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,10 @@ void setup()
115115
{
116116
// Open serial communications and wait for port to open:
117117
Serial.begin(115200);
118-
while (!Serial);
118+
while (!Serial && millis() < 5000);
119119

120-
Serial.print(F("\nStarting MQTTClient_Auth on "));
121-
Serial.print(BOARD_NAME);
122-
Serial.print(F(" with "));
123-
Serial.println(SHIELD_TYPE);
120+
Serial.print(F("\nStarting MQTTClient_Auth on ")); Serial.print(BOARD_NAME);
121+
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
124122
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
125123

126124
// initialize serial for ESP module

examples/MQTTClient_Auth/defines.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@
389389

390390
#include <ESP8266_AT_WebServer.h>
391391

392-
char ssid[] = "****"; // your network SSID (name)
393-
char pass[] = "****"; // your network password
392+
char ssid[] = "YOUR_SSID"; // your network SSID (name)
393+
char pass[] = "12345678"; // your network password
394394

395395
#endif //defines_h

examples/MQTTClient_Basic/MQTTClient_Basic.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,10 @@ void setup()
116116
{
117117
// Open serial communications and wait for port to open:
118118
Serial.begin(115200);
119-
while (!Serial);
119+
while (!Serial && millis() < 5000);
120120

121-
Serial.print(F("\nStarting MQTTClient_Basic on "));
122-
Serial.print(BOARD_NAME);
123-
Serial.print(F(" with "));
124-
Serial.println(SHIELD_TYPE);
121+
Serial.print(F("\nStarting MQTTClient_Basic on ")); Serial.print(BOARD_NAME);
122+
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
125123
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
126124

127125
// initialize serial for ESP module

examples/MQTTClient_Basic/defines.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@
389389

390390
#include <ESP8266_AT_WebServer.h>
391391

392-
char ssid[] = "****"; // your network SSID (name)
393-
char pass[] = "****"; // your network password
392+
char ssid[] = "YOUR_SSID"; // your network SSID (name)
393+
char pass[] = "12345678"; // your network password
394394

395395
#endif //defines_h

examples/MQTT_ThingStream/MQTT_ThingStream.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,10 @@ void setup()
160160
{
161161
// Open serial communications and wait for port to open:
162162
Serial.begin(115200);
163-
while (!Serial);
163+
while (!Serial && millis() < 5000);
164164

165-
Serial.print(F("\nStarting MQTT_ThingStream on "));
166-
Serial.print(BOARD_NAME);
167-
Serial.print(F(" with "));
168-
Serial.println(SHIELD_TYPE);
165+
Serial.print(F("\nStarting MQTT_ThingStream on ")); Serial.print(BOARD_NAME);
166+
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
169167
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
170168

171169
// initialize serial for ESP module

examples/MQTT_ThingStream/defines.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@
363363

364364
#endif
365365

366-
#define EspSerial Serial1
366+
#define EspSerial Serial1
367367

368368
#elif (ESP_AT_USE_AVR)
369369

@@ -389,7 +389,7 @@
389389

390390
#include <ESP8266_AT_WebServer.h>
391391

392-
char ssid[] = "****"; // your network SSID (name)
393-
char pass[] = "****"; // your network password
392+
char ssid[] = "YOUR_SSID"; // your network SSID (name)
393+
char pass[] = "12345678"; // your network password
394394

395395
#endif //defines_h

examples/PostServer/PostServer.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,10 @@ void setup()
140140
digitalWrite(led, 0);
141141

142142
Serial.begin(115200);
143-
while (!Serial);
143+
while (!Serial && millis() < 5000);
144144

145-
Serial.print(F("\nStarting POSTServer on "));
146-
Serial.print(BOARD_NAME);
147-
Serial.print(F(" with "));
148-
Serial.println(SHIELD_TYPE);
145+
Serial.print(F("\nStarting POSTServer on ")); Serial.print(BOARD_NAME);
146+
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
149147
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
150148

151149
// initialize serial for ESP module

examples/PostServer/defines.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@
363363

364364
#endif
365365

366-
#define EspSerial Serial1
366+
#define EspSerial Serial1
367367

368368
#elif (ESP_AT_USE_AVR)
369369

@@ -389,7 +389,7 @@
389389

390390
#include <ESP8266_AT_WebServer.h>
391391

392-
char ssid[] = "****"; // your network SSID (name)
393-
char pass[] = "****"; // your network password
392+
char ssid[] = "YOUR_SSID"; // your network SSID (name)
393+
char pass[] = "12345678"; // your network password
394394

395395
#endif //defines_h

examples/ScanNetworks/ScanNetworks.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,10 @@ void printEncryptionType(int thisType)
108108
void setup()
109109
{
110110
Serial.begin(115200);
111-
while (!Serial);
111+
while (!Serial && millis() < 5000);
112112

113-
Serial.print(F("\nStarting ScanNetworks on "));
114-
Serial.print(BOARD_NAME);
115-
Serial.print(F(" with "));
116-
Serial.println(SHIELD_TYPE);
113+
Serial.print(F("\nStarting ScanNetworks on ")); Serial.print(BOARD_NAME);
114+
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
117115
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
118116

119117
// initialize serial for ESP module

examples/ScanNetworks/defines.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@
389389

390390
#include <ESP8266_AT_WebServer.h>
391391

392-
char ssid[] = "****"; // your network SSID (name)
393-
char pass[] = "****"; // your network password
392+
char ssid[] = "YOUR_SSID"; // your network SSID (name)
393+
char pass[] = "12345678"; // your network password
394394

395395
#endif //defines_h

examples/SimpleAuthentication/SimpleAuthentication.ino

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,19 +181,18 @@ void handleNotFound()
181181
void setup()
182182
{
183183
Serial.begin(115200);
184+
while (!Serial && millis() < 5000);
185+
186+
Serial.print(F("\nStarting SimpleAuthentication on ")); Serial.print(BOARD_NAME);
187+
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
188+
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
184189

185190
// initialize serial for ESP module
186191
EspSerial.begin(115200);
187192

188193
// initialize ESP module
189194
WiFi.init(&EspSerial);
190195

191-
Serial.print(F("\nStarting SimpleAuthentication on "));
192-
Serial.print(BOARD_NAME);
193-
Serial.print(F(" with "));
194-
Serial.println(SHIELD_TYPE);
195-
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
196-
197196
// check for the presence of the shield
198197
if (WiFi.status() == WL_NO_SHIELD)
199198
{

examples/SimpleAuthentication/defines.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@
363363

364364
#endif
365365

366-
#define EspSerial Serial1
366+
#define EspSerial Serial1
367367

368368
#elif (ESP_AT_USE_AVR)
369369

@@ -389,7 +389,7 @@
389389

390390
#include <ESP8266_AT_WebServer.h>
391391

392-
char ssid[] = "****"; // your network SSID (name)
393-
char pass[] = "****"; // your network password
392+
char ssid[] = "YOUR_SSID"; // your network SSID (name)
393+
char pass[] = "12345678"; // your network password
394394

395395
#endif //defines_h

examples/UdpNTPClient/UdpNTPClient.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,10 @@ void sendNTPpacket(char *ntpSrv)
8080
void setup()
8181
{
8282
Serial.begin(115200);
83-
while (!Serial);
83+
while (!Serial && millis() < 5000);
8484

85-
Serial.print(F("\nStarting UdpNTPClient on "));
86-
Serial.print(BOARD_NAME);
87-
Serial.print(F(" with "));
88-
Serial.println(SHIELD_TYPE);
85+
Serial.print(F("\nStarting UdpNTPClient on ")); Serial.print(BOARD_NAME);
86+
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
8987
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
9088

9189
// initialize serial for ESP module

examples/UdpNTPClient/defines.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@
363363

364364
#endif
365365

366-
#define EspSerial Serial1
366+
#define EspSerial Serial1
367367

368368
#elif (ESP_AT_USE_AVR)
369369

@@ -389,7 +389,7 @@
389389

390390
#include <ESP8266_AT_WebServer.h>
391391

392-
char ssid[] = "****"; // your network SSID (name)
393-
char pass[] = "****"; // your network password
392+
char ssid[] = "YOUR_SSID"; // your network SSID (name)
393+
char pass[] = "12345678"; // your network password
394394

395395
#endif //defines_h

examples/UdpSendReceive/UdpSendReceive.ino

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,10 @@ void printWifiStatus()
6363
void setup()
6464
{
6565
Serial.begin(115200);
66+
while (!Serial && millis() < 5000);
6667

67-
// initialize serial for ESP module
68-
EspSerial.begin(115200);
69-
while (!Serial);
70-
71-
Serial.print(F("\nStarting UDPSendReceive on "));
72-
Serial.print(BOARD_NAME);
73-
Serial.print(F(" with "));
74-
Serial.println(SHIELD_TYPE);
68+
Serial.print(F("\nStarting UDPSendReceive on ")); Serial.print(BOARD_NAME);
69+
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
7570
Serial.println(ESP8266_AT_WEBSERVER_VERSION);
7671

7772
// initialize serial for ESP module

0 commit comments

Comments
 (0)