Skip to content

Commit adf9188

Browse files
maehara-keisukepablogs9
authored andcommitted
Wio Terminal Support (#1284)
* Include appropriate headers when target is Wio Terminal. Signed-off-by: maehara-keisuke <[email protected]> * Enable to compile publisher_wifi example when target is Wio Terminal. Signed-off-by: maehara-keisuke <[email protected]> * Follow CI. Signed-off-by: maehara-keisuke <[email protected]> * Add Wio Terminal to Community contributed board list. Signed-off-by: maehara-keisuke <[email protected]> --------- Signed-off-by: maehara-keisuke <[email protected]> (cherry picked from commit 8bf2f20) # Conflicts: # .github/workflows/ci.yml
1 parent 5619203 commit adf9188

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,20 @@ jobs:
2828
additional_urls:
2929
- https://raw.githubusercontent.com/ROBOTIS-GIT/OpenCR/master/arduino/opencr_release/package_opencr_index.json
3030
- https://github.com/espressif/arduino-esp32/releases/download/2.0.2/package_esp32_index.json
31-
- https://www.pjrc.com/teensy/td_156/package_teensy_index.json''' > arduino-cli.yaml
31+
- https://www.pjrc.com/teensy/td_156/package_teensy_index.json
32+
- https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json''' > arduino-cli.yaml
3233
curl -fsSL https://raw.githubusercontent.com/ROBOTIS-GIT/OpenCR/master/arduino/opencr_release/package_opencr_index.json -o /github/home/.arduino15/package_opencr_index.json
3334
curl -fsSL https://github.com/espressif/arduino-esp32/releases/download/2.0.2/package_esp32_index.json -o /github/home/.arduino15/package_esp32_index.json
3435
curl -fsSL https://www.pjrc.com/teensy/td_156/package_teensy_index.json -o /github/home/.arduino15/package_teensy_index.json
36+
curl -fsSL https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json -o /github/home/.arduino15/package_seeeduino_boards_index.json
3537
export PATH=$PATH:/github/workspace/bin:/__w/micro_ros_arduino/micro_ros_arduino/bin
3638
arduino-cli core install OpenCR:OpenCR -v
3739
arduino-cli core install arduino:samd -v
3840
arduino-cli core install arduino:sam -v
3941
arduino-cli core install arduino:mbed -v
4042
arduino-cli core install esp32:esp32 -v
4143
arduino-cli core install teensy:avr -v
44+
arduino-cli core install Seeeduino:samd -v
4245
#
4346
# PATCHING TEENSY AND SAM
4447
cat checkout/extras/patching_boards/platform_teensy.txt > /github/home/.arduino15/packages/teensy/hardware/avr/1.57.2/platform.txt
@@ -50,6 +53,7 @@ jobs:
5053
arduino-cli lib update-index
5154
arduino-cli lib install WiFiNINA
5255
arduino-cli lib install "STM32duino X-NUCLEO-IKS01A3"
56+
arduino-cli lib install "Seeed Arduino rpcWiFi" # Dependent libraries(e.g. "Seeed Arduino rpcUnified") will be installed together. See https://wiki.seeedstudio.com/Wio-Terminal-Network-Overview/#needed-libraries-for-wi-fi for more details.
5357
# Build all demos
5458
arduino-cli compile --fqbn OpenCR:OpenCR:OpenCR /github/home/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher -v
5559
arduino-cli compile --fqbn OpenCR:OpenCR:OpenCR /github/home/Arduino/libraries/micro_ros_arduino/examples/micro-ros_addtwoints_service -v
@@ -75,4 +79,5 @@ jobs:
7579
arduino-cli compile --fqbn arduino:mbed:envie_m7 /github/home/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher -v
7680
arduino-cli compile --fqbn arduino:mbed:envie_m7 /github/home/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher_wifi -v
7781
arduino-cli compile --fqbn esp32:esp32:esp32 /github/home/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher -v
78-
arduino-cli compile --fqbn esp32:esp32:esp32 /github/home/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher_wifi -v
82+
arduino-cli compile --fqbn esp32:esp32:esp32 /github/home/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher_wifi -v
83+
arduino-cli compile --fqbn Seeeduino:samd:seeed_wio_terminal /github/home/Arduino/libraries/micro_ros_arduino/examples/micro-ros_publisher_wifi -v

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Community contributed boards are:
4444
| [Arduino Zero](https://store.arduino.cc/arduino-zero) | - | [@lukicdarkoo](https://github.com/lukicdarkoo) | | `colcon_verylowmem.meta` |
4545
| [Kakute F7](http://www.holybro.com/product/kakute-f7-aio-v1-5/) | - | [@amfern](https://github.com/amfern) | | `colcon.meta` |
4646
| [STM32-E407](https://www.olimex.com/Products/ARM/ST/STM32-E407/resources/STM32-E407.pdf) | - | [@dominikn](https://github.com/dominikn) | | `colcon.meta` |
47+
| [Wio Terminal](https://wiki.seeedstudio.com/Wio-Terminal-Getting-Started/) | - | [@maehara-keisuke](https://github.com/maehara-keisuke) | | `colcon.meta` |
4748

4849
You can find the available precompiled ROS 2 types for messages and services in [available_ros2_types](available_ros2_types).
4950

examples/micro-ros_publisher_wifi/micro-ros_publisher_wifi.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
#include <std_msgs/msg/int32.h>
1010

11-
#if !defined(ESP32) && !defined(TARGET_PORTENTA_H7_M7) && !defined(ARDUINO_NANO_RP2040_CONNECT)
12-
#error This example is only avaible for Arduino Portenta, Arduino Nano RP2040 Connect and ESP32 Dev module
11+
#if !defined(ESP32) && !defined(TARGET_PORTENTA_H7_M7) && !defined(ARDUINO_NANO_RP2040_CONNECT) && !defined(ARDUINO_WIO_TERMINAL)
12+
#error This example is only avaible for Arduino Portenta, Arduino Nano RP2040 Connect, ESP32 Dev module and Wio Terminal
1313
#endif
1414

1515
rcl_publisher_t publisher;

src/micro_ros_arduino.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,17 @@ static inline void set_microros_native_ethernet_udp_transports(byte mac[], IPAdd
9595

9696
#endif
9797

98-
#if defined(ESP32) || defined(TARGET_PORTENTA_H7_M7) || defined(ARDUINO_NANO_RP2040_CONNECT)
98+
#if defined(ESP32) || defined(TARGET_PORTENTA_H7_M7) || defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_WIO_TERMINAL)
9999

100100
#if defined(ESP32) || defined(TARGET_PORTENTA_H7_M7)
101101
#include <WiFi.h>
102102
#include <WiFiUdp.h>
103103
#elif defined(ARDUINO_NANO_RP2040_CONNECT)
104104
#include <SPI.h>
105105
#include <WiFiNINA.h>
106+
#elif defined(ARDUINO_WIO_TERMINAL)
107+
#include <rpcWiFi.h>
108+
#include <WiFiUdp.h>
106109
#endif
107110

108111
extern "C" bool arduino_wifi_transport_open(struct uxrCustomTransport * transport);

src/wifi_transport.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#if defined(ESP32) || defined(TARGET_PORTENTA_H7_M7) || defined(ARDUINO_NANO_RP2040_CONNECT)
2-
1+
#if defined(ESP32) || defined(TARGET_PORTENTA_H7_M7) || defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_WIO_TERMINAL)
32
#include <Arduino.h>
43

54

@@ -9,6 +8,9 @@
98
#elif defined(ARDUINO_NANO_RP2040_CONNECT)
109
#include <SPI.h>
1110
#include <WiFiNINA.h>
11+
#elif defined(ARDUINO_WIO_TERMINAL)
12+
#include <rpcWiFi.h>
13+
#include <WiFiUdp.h>
1214
#endif
1315

1416
#include <micro_ros_arduino.h>

0 commit comments

Comments
 (0)