
My take on it is that VSCode / Platformio is extremely convenient for those who are writing complex code that involves (for example) writing new libraries alongside the actual Arduino or ESP code, or working with files of different kinds all next to each other (as in the article summary). I’ve played around with VSCode / Platformio a bit, alongside the Arduino IDE.


In this tutorial you’ve learned how to install and prepare Visual Studio Code to work with the ESP32 and ESP8266 boards. Alternatively, you can go to the PIO Project Tasks menu and select Upload.įor a complete list of VS Code shortcuts for Windows, Mac OS X or Linux, check the next link: Now, you can click on the Upload icon to compile and upload the code. Additionally, if you have a syntax error somewhere in your program, it will underline it in red even before compiling.Īfter that, press Ctrl+ S or go to File > Save to save the file. We recommend that you copy this code manually, so that you see the autocompletion and other interesting features of the IDE in action. It works with the ESP32 and ESP8266 boards (both have the on-board LED connected to GPIO 2).

This code blinks the on-board LED every second. put your main code here, to run repeatedly: put your setup code here, to run once: Uploading Code using PlatformIO IDE: ESP32/ESP8266Ĭopy the following code to your main.cpp file. In PlatformIO, all your Arduino sketches should start with the #include.
