Skip to content

Add support to Raspberry Pi Pico W #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ jobs:
- fqbn: arduino:mbed_edge:edge_control
platform-name: arduino:mbed_edge
artifact-name-suffix: arduino-mbed_edge-edge_control
- fqbn: "rp2040:rp2040:rpipicow"
platform-name: rp2040:rp2040
artifact-name-suffix: rp2040-rp2040-rpipicow

# Make board type-specific customizations to the matrix jobs
include:
Expand Down Expand Up @@ -181,6 +184,14 @@ jobs:
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
sketch-paths: |
- examples/ConnectionHandlerDemo-Notecard
- board:
platform-name: rp2040:rp2040
platforms: |
# Install rp2040 platform via Boards Manager
- name: rp2040:rp2040
source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
sketch-paths: |
- examples/ConnectionHandlerDemo-Notecard

steps:
- uses: actions/checkout@v4
Expand Down
7 changes: 7 additions & 0 deletions src/ConnectionHandlerDefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@
#define NETWORK_HARDWARE_ERROR
#endif

#if defined(ARDUINO_RASPBERRY_PI_PICO_W)
#define BOARD_HAS_WIFI
#define NETWORK_HARDWARE_ERROR WL_NO_SHIELD
#define NETWORK_IDLE_STATUS WL_IDLE_STATUS
#define NETWORK_CONNECTED WL_CONNECTED
#endif

#endif // BOARD_HAS_NOTECARD

/******************************************************************************
Expand Down
3 changes: 3 additions & 0 deletions src/WiFiConnectionHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
#include <WiFiUdp.h>
#elif defined(ARDUINO_UNOR4_WIFI)
#include <WiFiS3.h>
#elif defined(ARDUINO_RASPBERRY_PI_PICO_W)
#include <WiFi.h>
#include <WiFiUdp.h>
#endif

#ifndef BOARD_HAS_WIFI
Expand Down
Loading