Skip to content

Commit fad19a8

Browse files
committed
Make example's loops to allow the CPU to switch tasks
1 parent e64de54 commit fad19a8

File tree

9 files changed

+9
-1
lines changed

9 files changed

+9
-1
lines changed

libraries/WebServer/examples/AdvancedWebServer/AdvancedWebServer.ino

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ void setup(void) {
125125

126126
void loop(void) {
127127
server.handleClient();
128+
delay(2);//allow the cpu to switch to other tasks
128129
}
129130

130131
void drawGraph() {

libraries/WebServer/examples/FSBrowser/FSBrowser.ino

+1
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,5 @@ void setup(void) {
300300

301301
void loop(void) {
302302
server.handleClient();
303+
delay(2);//allow the cpu to switch to other tasks
303304
}

libraries/WebServer/examples/HelloServer/HelloServer.ino

+1
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,5 @@ void setup(void) {
7070

7171
void loop(void) {
7272
server.handleClient();
73+
delay(2);//allow the cpu to switch to other tasks
7374
}

libraries/WebServer/examples/HttpAdvancedAuth/HttpAdvancedAuth.ino

+1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,5 @@ void setup() {
5656
void loop() {
5757
ArduinoOTA.handle();
5858
server.handleClient();
59+
delay(2);//allow the cpu to switch to other tasks
5960
}

libraries/WebServer/examples/HttpBasicAuth/HttpBasicAuth.ino

+1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ void setup() {
3838
void loop() {
3939
ArduinoOTA.handle();
4040
server.handleClient();
41+
delay(2);//allow the cpu to switch to other tasks
4142
}

libraries/WebServer/examples/PathArgServer/PathArgServer.ino

+1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ void setup(void) {
5353

5454
void loop(void) {
5555
server.handleClient();
56+
delay(2);//allow the cpu to switch to other tasks
5657
}

libraries/WebServer/examples/SDWebServer/SDWebServer.ino

+1
Original file line numberDiff line numberDiff line change
@@ -310,4 +310,5 @@ void setup(void) {
310310

311311
void loop(void) {
312312
server.handleClient();
313+
delay(2);//allow the cpu to switch to other tasks
313314
}

libraries/WebServer/examples/SimpleAuthentification/SimpleAuthentification.ino

+1
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,5 @@ void setup(void) {
129129

130130
void loop(void) {
131131
server.handleClient();
132+
delay(2);//allow the cpu to switch to other tasks
132133
}

libraries/WebServer/examples/WebUpdate/WebUpdate.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ void setup(void) {
6565

6666
void loop(void) {
6767
server.handleClient();
68-
delay(1);
68+
delay(2);//allow the cpu to switch to other tasks
6969
}

0 commit comments

Comments
 (0)