Skip to content

Commit

Permalink
Merge pull request #126 from pennam/pico_w-2
Browse files Browse the repository at this point in the history
Add support to Raspberry Pi Pico W
  • Loading branch information
pennam authored Sep 9, 2024
2 parents f7c9eb7 + 8e11455 commit e83529a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
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

0 comments on commit e83529a

Please sign in to comment.