Skip to content

Setup PIO Arduino

PIO Arduino An extension for Visual Studio Code editor to enable ESP32 boards programming. Supports multiple development boards, Arduino libraries, syntax highlighting, autocomplete, indexing, extensions and many more.

Step 1. Install PIO Arduino

Download Visual Studio Code

Click Extensions icon -> search for pioarduino -> click Install.

PIO Arduino install

Step 2. Create project

PIO Arduino new project

  1. Open PIO Home by clicking PIO HomeOpen.
  2. Click + New Project and select:
    Name: any project name.
    Board: select Espressif ESP32 Dev Module.
    Framework: select Arduino.
  3. Click Finish and project will be created.
    Note: creating project first time can take a few minutes. Wait for it to finish.
  4. Open platformio.ini file and replace its content with:
    platformio.ini
    ; Project Configuration File
    [env:roboboard]
    platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
    board = esp32dev
    framework = arduino
    
    lib_deps = totemmaker/Totem Roboboard
    
    monitor_dtr = 0
    monitor_rts = 0
    monitor_speed = 115200
    monitor_filters = esp32_exception_decoder
    
    upload_speed = 1000000
    
    board_build.f_flash = 80000000L
    board_build.partitions = default_8MB.csv
    board_upload.flash_size = 8MB
    board_upload.maximum_size = 8388608
    
    Save file and wait for loading to finish.
  5. Inside src/main.cpp write Arduino code ant build a project.
    #include <Roboboard.h> # Include RoboBoard control functions
    
    void setup() {
      Board.begin(); // Initialize RoboBoard
    }
    
    void loop() {
      RGB.color(Color::random()); // Set random color
      delay(500); // Wait 500ms
    }
    
    Code and configuration is the same for RoboBoard X3 and RoboBoard X4.
    RoboBoard.h is provided by TotemRoboboard library.

Step 3. Using PIO Arduino

Now you can build and upload the code to develop custom program for Totem RoboBoard.
PIO Arduino is modified PlatformIO extension, enabling to use latest ESP32 Arduino Core.
For more information read following topics:

User interface:

Code documentation:

Code examples:

Question

Visit ℹ Support page to find more information or help from our community.