Manage Two Arduinos with Ease Using PlatformIO

Requirements

Hardware

  • Arduino Nano 33 BLE Sense
  • Arduino Nano 33 BLE Sense (or any other Arduino board that works at 3.3V)
  • 2 x mini breadboard or 1 x long breadboard
  • 3 x jumper wires

Software

Skills

  • Familiarity with Visual Studio Code
  • Basic command-line skills

Overview

Schematic of our UART example

Code

Create a new project
Project Wizard
Create source files

Configure

Linking .pio\build\nano33ble\firmware.elf
c:/users/lixiang/.platformio/.../ld.exe:
.pio\build\nano33ble\src\transmitter.cpp.o: multiple definition of `setup';
.pio\build\nano33ble\src\receiver.cpp.o: first defined here
c:/users/lixiang/.platformio/.../ld.exe:
.pio\build\nano33ble\src\transmitter.cpp.o: multiple definition of `loop';
.pio\build\nano33ble\src\receiver.cpp.o: first defined here
collect2.exe: error: ld returned 1 exit status
pio device list
> pio device list
COM12
-----
Hardware ID: USB VID:PID=1234:5678 SER=F8EF8889D0211923 LOCATION=1-3.2:x.0
Description: USB 串行设备 (COM12)
COM11
-----
Hardware ID: USB VID:PID=1234:5678 SER=DAB991012486A110 LOCATION=1-3.1:x.0
Description: USB 串行设备 (COM11)

Build & Upload

pio run

Monitor

Test

Congrats!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kevin Li

Kevin Li

❤️ Open Source, Web Dev, programming languages, and Hanzi 漢字