Skip to content

Commit

Permalink
examples: disable WiFi low power mode in RP2040
Browse files Browse the repository at this point in the history
  • Loading branch information
yoursunny committed Jul 21, 2024
1 parent 63a0833 commit 521a0f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Packet encoding and decoding
Transports

* Ethernet: unicast and multicast on ESP8266 and ESP32
* UDP/IPv4: unicast and multicast on ESP8266 and ESP32
* UDP/IPv4: unicast and multicast on ESP8266 and ESP32; unicast on RP2040
* UDP/IPv6: unicast on ESP8266 and ESP32
* [Bluetooth Low Energy](https://github.com/yoursunny/NDNts/tree/main/pkg/web-bluetooth-transport): server/peripheral only on ESP32 and nRF52

Expand Down
4 changes: 3 additions & 1 deletion examples/PingClient/PingClient.ino
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ setup() {
Serial.println();
esp8266ndn::setLogOutput(Serial);

#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
WiFi.persistent(false);
WiFi.mode(WIFI_STA);
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
WiFi.setSleep(false);
#elif defined(ARDUINO_ARCH_RP2040)
WiFi.noLowPowerMode();
#endif
WiFi.begin(WIFI_SSID, WIFI_PASS);
if (WiFi.waitForConnectResult() != WL_CONNECTED) {
Expand Down

0 comments on commit 521a0f1

Please sign in to comment.