3.0 PlatformIO Arduino Deployment - SwollEngineAF/lipan GitHub Wiki

🛠 PlatformIO: Arduino Deployment (Lipan 2.0)

This section documents how to run and deploy Arduino code using PlatformIO inside the lipan repo.

📦 What is PlatformIO?

PlatformIO is a modern development ecosystem for embedded systems. It is fully integrated with VSCode, supports multiple boards (e.g., Arduino Uno), and simplifies compiling and flashing firmware.


🧰 Prerequisites


📂 Repo Structure

lipan/
├── arduino/
│   ├── Arm/             ← PCA9685-based robot arm
│   ├── DiffDRive/       ← Differential drive tests
│   ├── sketch_may26[a–e]← Experimental sketches
│   └── pixy_stream.py   ← Pixy2 serial reader

Each subfolder like Arm/ and DiffDRive/ is a standalone PlatformIO project.


🚀 How to Run

  1. Open Folder In VSCode, open lipan/arduino/Arm/ or lipan/arduino/DiffDRive/.

  2. Connect Board Plug in your Arduino (typically /dev/ttyUSB0 or /dev/ttyUSB1).

  3. Upload Sketch Click the ✅ "Build" button → then the ▶️ "Upload" arrow from the PlatformIO toolbar.

  4. Serial Monitor (optional) Click the 🔍 icon to open the serial monitor.


📝 Notes

  • Board and framework are defined in platformio.ini (e.g., board = uno)

  • For serial commands (e.g., robot arm control), open the serial monitor and send:

    B:500
    G:1