How to Program Arduino Through Visual Studio Code Using PlatformIO
Sometimes, coding on the Arduino IDE is just not enough. Think about all the tools it’s missing: no spell check, no folders, no autocomplete. Sure, you can just program Arduino on an editor and then paste it on the IDE before uploading. But PlatformIO lets you do that without having to switch windows at all.
What Is PlatformIO?
PlatformIO is an extension for Visual Studio Code that lets you run and debug code for embedded systems. It currently supports 1,395 development boards from all kinds of manufacturers, letting you use it for more than just the Arduino.
Comparing PlatformIO to the Arduino IDE can be more like a “use it and you’ll know it” kind of thing. In my opinion, it’s definitely better because you can add more features to it, like better C/C++ linters, autocomplete, and even MicroPython support. It also supports Git, which is good if you work in teams.
Installing PlatformIO
- In Visual Studio Code, click the Extensions button on the left tray or press Ctrl + Shift + X on the keyboard.

- In the Search Extensions bar, type
platformio
, then click on the result that says “PlatformIO IDE”.

- Click the “Install” button and wait until it finishes installing.
- When it’s successful, the PlatformIO logo should show up on Visual Studio Code’s left tray area. Press this logo whenever you want to use PlatformIO.
Coding With PlatformIO
Compared to the Arduino IDE, coding with PlatformIO requires a few extra steps. For this example, we’ll use an Arduino Uno and make it blink its internal LED.
- Press the PlatformIO icon on the left tray area.

- Press Open.
- The PIO Home page should show up. You’ll find a quick access bar to the right. Select “New Project”.

- A Project Wizard should show up. You can type in “PlatformIO Blink” on the Name textbox. Then type in or look for “Arduino Uno” in the Board dropdown and select Arduino in the Framework dropdown.

- Optional: PlatformIO automatically saves your projects in its default folder (Documents\PlatformIO\Projects). You can untick the checkbox that says “Use default location” and then select or make your own folder via the explorer that shows up below it.

- Click “Finish” when you’re done. The initialization process may take a while for the first time. It might also ask you if you trust the authors of the files in the folder. If it’s just you working on your own project, then click “Yes, I trust the authors”. Otherwise, press “No, I don’t trust the authors”. You can always change that option at another time.

Read More: How to Program Arduino Through Visual Studio Code Using PlatformIO – Make Tech Easier