
Elevate your Arduino projects with PlatformIO
If you use the Arduino IDE and want something better, start using PlatformIO. It is a comprehensive tool for many boards across many platforms.
Install
pip install platformio
Start a new project
mkdir foopio
cd foopio
pio project init
Open the project in your editor and add this to platformio.ini:
[platformio]
default_envs = esp32dev
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
Create the firmware entry file:
touch src/main.cpp
Blink example
#include <Arduino.h>
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
Connect your device and upload:
pio run -t upload
For production IoT lessons beyond blink demos, see Shipping IoT past the demo.