Skip to content

Commit d0d58fd

Browse files
authored
Merge pull request #163 from arduino-libraries/fix-AP_SimpleWebServer
Bugfix: Short timeout allows SPI on RP2040 to be served in AP_SimpleWebServer
2 parents f7039f2 + 3ca168c commit d0d58fd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/AP_SimpleWebServer/AP_SimpleWebServer.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ void loop() {
9999
Serial.println("new client"); // print a message out the serial port
100100
String currentLine = ""; // make a String to hold incoming data from the client
101101
while (client.connected()) { // loop while the client's connected
102+
delayMicroseconds(10); // This is required for the Arduino Nano RP2040 Connect - otherwise it will loop so fast that SPI will never be served.
102103
if (client.available()) { // if there's bytes to read from the client,
103104
char c = client.read(); // read a byte, then
104105
Serial.write(c); // print it out the serial monitor

0 commit comments

Comments
 (0)