Skip to content

Commit d9a5c62

Browse files
earlephilhowerLinks2004
authored andcommitted
Port to Raspberry Pi Pico W core
Add support for the onboard WiFi chip on the Raspberry Pi Pico W (RP2040 based ) board using the arduino-pico Arduino core at https://github.com/earlephilhower/arduino-pico The PicoW WiFi stack is a mashup of the ESP8266 and ESP32 cores, so only minimal changes were required. Defines a new NETWORK_TYPE for the PicoW. ESP8266 examples renames to ESP8266_PICO because they all work unmodified (except for OTA which is handled differently on the Pico)
1 parent 323592f commit d9a5c62

File tree

28 files changed

+61
-25
lines changed

28 files changed

+61
-25
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ a WebSocket Server and Client for Arduino based on RFC6455.
2626
- ESP8266 [Arduino for ESP8266](https://github.com/esp8266/Arduino/)
2727
- ESP32 [Arduino for ESP32](https://github.com/espressif/arduino-esp32)
2828
- ESP31B
29+
- Raspberry Pi Pico W [Arduino for Pico](https://github.com/earlephilhower/arduino-pico)
2930
- Particle with STM32 ARM Cortex M3
3031
- ATmega328 with Ethernet Shield (ATmega branch)
3132
- ATmega328 with enc28j60 (ATmega branch)
File renamed without changes.

examples/esp8266/WebSocketClientOTA/WebSocketClientOTA.ino renamed to examples/esp8266_pico/WebSocketClientOTA/WebSocketClientOTA.ino

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88
#include <Arduino.h>
99
#include <ArduinoJson.h>
1010

11-
#ifdef ESP8266
11+
#if defined(ESP8266)
1212
#include <ESP8266WiFi.h>
1313
#include <ESP8266mDNS.h>
14-
#include <Updater.h>
15-
#endif
16-
#ifdef ESP32
14+
#include <Updater.h>
15+
#elif defined(ESP32)
1716
#include "WiFi.h"
1817
#include "ESPmDNS.h"
19-
#include <Update.h>
18+
#include <Update.h>
19+
#else
20+
#error Unsupported device
2021
#endif
2122

2223
#include <WiFiUdp.h>

0 commit comments

Comments
 (0)