Skip to content

Commit 0f4b611

Browse files
fix: arduino-pico compatibility (#85)
* fix: arduino-pico compatibility - Switch to RPAsyncTCP dependency - Added support for RP2350 * fix: CI for RP2040 and RP2350 * chore: ci trigger * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent 306dcf6 commit 0f4b611

File tree

41 files changed

+171
-100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+171
-100
lines changed

.github/workflows/build-arduino.yml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
echo "============================================================="
7777
arduino-cli compile --library . --warnings none -b esp32:esp32:esp32 "examples/$i/$i.ino"
7878
done
79-
79+
8080
arduino-esp8266:
8181
name: Arduino ESP8266
8282
runs-on: ubuntu-latest
@@ -110,7 +110,7 @@ jobs:
110110
111111
arduino-rp2040:
112112
name: Arduino RP2040
113-
runs-on: ubuntu-latest
113+
runs-on: ubuntu-latest
114114
steps:
115115
- name: Install arduino-cli
116116
run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
@@ -124,8 +124,8 @@ jobs:
124124
- name: Install ArduinoJson
125125
run: arduino-cli lib install ArduinoJson
126126

127-
- name: Install AsyncTCP (RP2040)
128-
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/khoih-prog/AsyncTCP_RP2040W#v1.2.0
127+
- name: Install RPAsyncTCP
128+
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ayushsharma82/RPAsyncTCP#v1.3.0
129129

130130
- name: Checkout
131131
uses: actions/checkout@v4
@@ -138,3 +138,34 @@ jobs:
138138
echo "============================================================="
139139
arduino-cli compile --library . --warnings none -b rp2040:rp2040:rpipicow "examples/$i/$i.ino"
140140
done
141+
142+
arduino-rp2350:
143+
name: Arduino RP2350
144+
runs-on: ubuntu-latest
145+
steps:
146+
- name: Install arduino-cli
147+
run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
148+
149+
- name: Update core index
150+
run: arduino-cli core update-index --additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/4.4.3/package_rp2040_index.json
151+
152+
- name: Install core
153+
run: arduino-cli core install --additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/4.4.3/package_rp2040_index.json rp2040:rp2040
154+
155+
- name: Install ArduinoJson
156+
run: arduino-cli lib install ArduinoJson
157+
158+
- name: Install RPAsyncTCP
159+
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ayushsharma82/RPAsyncTCP#v1.3.0
160+
161+
- name: Checkout
162+
uses: actions/checkout@v4
163+
164+
- name: Build Examples
165+
run: |
166+
for i in `ls examples`; do
167+
echo "============================================================="
168+
echo "Building examples/$i..."
169+
echo "============================================================="
170+
arduino-cli compile --library . --warnings none -b rp2040:rp2040:rpipico2w "examples/$i/$i.ino"
171+
done

.github/workflows/build-pioarduino.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,43 @@ jobs:
224224
echo "============================================================="
225225
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-raspberrypi
226226
done
227+
228+
platformio-rp2350:
229+
name: PIO RP2350
230+
runs-on: ubuntu-latest
231+
strategy:
232+
fail-fast: false
233+
matrix:
234+
board:
235+
- rpipico2w
236+
237+
steps:
238+
- name: Checkout
239+
uses: actions/checkout@v4
240+
241+
- name: Cache PlatformIO
242+
uses: actions/cache@v4
243+
with:
244+
key: ${{ runner.os }}-pio
245+
path: |
246+
~/.cache/pip
247+
~/.platformio
248+
249+
- name: Python
250+
uses: actions/setup-python@v5
251+
with:
252+
python-version: "3.x"
253+
254+
- name: Install PIO
255+
run: |
256+
python -m pip install --upgrade pip
257+
pip install --upgrade platformio
258+
259+
- name: Build Examples
260+
run: |
261+
for i in `ls examples`; do
262+
echo "============================================================="
263+
echo "Building examples/$i..."
264+
echo "============================================================="
265+
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-raspberrypi
266+
done

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ lib_ignore =
8989
ESP32Async/AsyncTCP
9090
```
9191

92-
**AsyncTCP_RP2040W**
92+
**RPAsyncTCP**
9393

94-
AsyncTCP_RP2040W provides support for RP2040 and replaced AsyncTCP in this case:
94+
RPAsyncTCP replaces AsyncTCP to provide support for RP2040(+WiFi) and RP2350(+WiFi) boards. For example - Raspberry Pi Pico W and Raspberry Pi Pico 2W.
9595

9696
```ini
9797
lib_compat_mode = strict
@@ -100,7 +100,7 @@ platform = https://github.com/maxgerhardt/platform-raspberrypi.git
100100
board = rpipicow
101101
board_build.core = earlephilhower
102102
lib_deps =
103-
khoih-prog/AsyncTCP_RP2040W @ 1.2.0
103+
ayushsharma82/[email protected].0
104104
ESP32Async/ESPAsyncWebServer
105105
lib_ignore =
106106
lwIP_ESPHost

examples/Auth/Auth.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#elif defined(ESP8266)
1313
#include <ESP8266WiFi.h>
1414
#include <ESPAsyncTCP.h>
15-
#elif defined(TARGET_RP2040)
16-
#include <WebServer.h>
15+
#elif defined(TARGET_RP2040) || defined(TARGET_RP2350) || defined(PICO_RP2040) || defined(PICO_RP2350)
16+
#include <RPAsyncTCP.h>
1717
#include <WiFi.h>
1818
#endif
1919

examples/CORS/CORS.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#elif defined(ESP8266)
1313
#include <ESP8266WiFi.h>
1414
#include <ESPAsyncTCP.h>
15-
#elif defined(TARGET_RP2040)
16-
#include <WebServer.h>
15+
#elif defined(TARGET_RP2040) || defined(TARGET_RP2350) || defined(PICO_RP2040) || defined(PICO_RP2350)
16+
#include <RPAsyncTCP.h>
1717
#include <WiFi.h>
1818
#endif
1919

examples/CaptivePortal/CaptivePortal.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#elif defined(ESP8266)
99
#include <ESP8266WiFi.h>
1010
#include <ESPAsyncTCP.h>
11-
#elif defined(TARGET_RP2040)
12-
#include <WebServer.h>
11+
#elif defined(TARGET_RP2040) || defined(TARGET_RP2350) || defined(PICO_RP2040) || defined(PICO_RP2350)
12+
#include <RPAsyncTCP.h>
1313
#include <WiFi.h>
1414
#endif
1515
#include "ESPAsyncWebServer.h"

examples/CatchAllHandler/CatchAllHandler.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#elif defined(ESP8266)
1313
#include <ESP8266WiFi.h>
1414
#include <ESPAsyncTCP.h>
15-
#elif defined(TARGET_RP2040)
16-
#include <WebServer.h>
15+
#elif defined(TARGET_RP2040) || defined(TARGET_RP2350) || defined(PICO_RP2040) || defined(PICO_RP2350)
16+
#include <RPAsyncTCP.h>
1717
#include <WiFi.h>
1818
#endif
1919

examples/ChunkResponse/ChunkResponse.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#elif defined(ESP8266)
1313
#include <ESP8266WiFi.h>
1414
#include <ESPAsyncTCP.h>
15-
#elif defined(TARGET_RP2040)
16-
#include <WebServer.h>
15+
#elif defined(TARGET_RP2040) || defined(TARGET_RP2350) || defined(PICO_RP2040) || defined(PICO_RP2350)
16+
#include <RPAsyncTCP.h>
1717
#include <WiFi.h>
1818
#endif
1919

examples/ChunkRetryResponse/ChunkRetryResponse.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#elif defined(ESP8266)
1313
#include <ESP8266WiFi.h>
1414
#include <ESPAsyncTCP.h>
15-
#elif defined(TARGET_RP2040)
16-
#include <WebServer.h>
15+
#elif defined(TARGET_RP2040) || defined(TARGET_RP2350) || defined(PICO_RP2040) || defined(PICO_RP2350)
16+
#include <RPAsyncTCP.h>
1717
#include <WiFi.h>
1818
#endif
1919

examples/EndBegin/EndBegin.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#elif defined(ESP8266)
1313
#include <ESP8266WiFi.h>
1414
#include <ESPAsyncTCP.h>
15-
#elif defined(TARGET_RP2040)
16-
#include <WebServer.h>
15+
#elif defined(TARGET_RP2040) || defined(TARGET_RP2350) || defined(PICO_RP2040) || defined(PICO_RP2350)
16+
#include <RPAsyncTCP.h>
1717
#include <WiFi.h>
1818
#endif
1919

0 commit comments

Comments
 (0)