VS Code and pioarduino IDE: Programming the ESP32 (Windows, Mac OS X, Linux)
Program the ESP32 boards using VS Code (Visual Studio Code) with the pioarduino IDE extension. Install the software on Windows, Mac OS X or Linux Ubuntu Operating Systems.
- Suitable forB.Tech/Diploma IoT/ESP32 students
- Build time1-2 weeks
- LevelIntermediate
- Available atAjvika Labs, Kakinada
About this project
Learn how to program the ESP32 boards using VS Code (Microsoft Visual Studio Code) with the
pioarduino IDE
extension. The pioarduino IDE extension supports the latest Arduino core for the ESP32 (version 3). We cover how to install the software on Windows, Mac OS X or Linux Ubuntu operating systems.
The PlatformIO extension used in earlier tutorials is now deprecated. To program the ESP32 in VS Code with the latest core version, we recommend using the
pioarduino
extension instead.
PlatformIO IDE and pioarduino IDE Extensions
The pioarduino extension is a fork of the PlatformIO extension maintained by the community that adds support for the latest Arduino core updates for the ESP32.
In earlier tutorials, we used the PlatformIO extension. However, it doesn’t support the latest ESP32 Arduino Core (v3). To address this, the community created
pioarduino
, a fork that supports the newest core. We’re now using
pioarduino IDE
instead—if you’re familiar with PlatformIO, it works the same way.
How to Program the ESP32 with VS Code and the Latest Arduino Core (version 3)?
If you’re already familiar with programming the ESP32 with VS Code, you can read this quick answer; otherwise, follow the complete tutorial afterwards.
Quick answer:
1)
Install the
pioarduino IDE
extension on VS Code.
2)
Add the following line to the platformio.ini file:
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
This line specifies a custom version of the Espressif 32 platform, maintained by
pioarduino IDE
, that supports the latest ESP32 Arduino core. Unlike the default PlatformIO Espressif 32 platform (which you would normally define as
platform = espressif32
), this URL ensures compatibility with version 3 of the ESP32 core.
Installing VS Code
Follow the next instructions to install VS Code on your Operating System:
A)
Windows
B)
MacOS X
C)
Linux
A) Installing VS Code on Windows (Visual Studio Code)
Go to
code.visualstudio.com
and download the stable build for your operating system (Windows).
Click on the installation wizard to start the installation and follow all the steps to complete the installation. Accept the agreement and press the
Next
button.
Select the following options and click
Next
Press the
Install
button.
Finally, click
Finish
to finish the installation.
Open VS Code, and you’ll be greeted by a Welcome tab with the released notes of the newest version.
That’s it. Visual Studio Code was successfully installed.
B) Installing VS Code on Mac OS X (Visual Studio Code)
Go to
code.visualstudio.com
and download the stable build for your operating system (Mac OS X).
After downloading the Visual Studio Code application file, you’ll be prompted with the following message. Press the “
Open
” button.
Or open your Downloads folder and open Visual Studio Code.
After that, you’ll be greeted by a Welcome tab with the released notes of the newest version.
That’s it. Visual Studio Code was successfully installed.
C) Installing VS Code on Linux Ubuntu (Visual Studio Code)
Go to
code.visualstudio.com
and download the stable build for your operating system (Linux Ubuntu).
Save the installation file:
To install it, open a Terminal window, navigate to your Downloads folder and run the following command to install VS Code.
$ cd Downloads
~/Downloads $ sudo apt install ./code_1.49.1-1600299189_amd64.deb
When the installation is finished, VS Code should be available in your applications menu.
Open VS Code, and you’ll be greeted by a Welcome tab with the released notes of the newest version.
That’s it. Visual Studio Code was successfully installed.
Installing Python on Windows
To program the ESP32 with pioarduino, you need Python 3.5 or a later version installed on your computer. Follow the instructions according to your operating system:
A) Installing Python on Windows
B) Installing Python on MacOS
C) Installing Python on Ubuntu Linux
A) Installing Python on Windows
Go to
python.org/downloads
and download Python 3.13.3 or a later version.
Open the downloaded file to start the Python installation wizard. The following windows show up.
Important:
make sure you check the option
Add Python to PATH
. Then, you can click on the
Install Now
button. You may also need to check the “Use admin privileges when installing py.exe”.
If the installation is successful, you’ll get the following message.
Finally, click the
Close
button.
Installing Python on Mac OS X
Open a Terminal window. You can open it through Spotlight Search. To launch Spotlight, click the small magnifying glass icon in your menu bar (or press
Cmd
+
Space
).
Then, type “terminal” and click on the Terminal icon to launch it.
To install Python, I’ll be using
Homebrew
. If you don’t have the
brew
command available, type the next command in the Terminal window:
/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)\"
Here’s how it looks on the Terminal window:
Then, run the brew command to install Python 3.13:
brew install python3
Here’s how it looks on the Terminal window:
Now, you can proceed to
this section to install the pioarduino extension
Installing Python on Linux Ubuntu
To program the ESP32 boards with pioarduino IDE, you need Python 3.5 or a later version installed on your computer.
Open the Terminal window and check that you already have Python 3 installed. Run the following command:
python3 --version
It should return the current installed version:
python 3.13.3
If you don’t have Python installed, run the next command to install it:
sudo apt install python3
Whether you already have Python installed or not, you need to run the following command to install Python utilities.
sudo apt install python3-distutils
Installing the pioarduino IDE Extension
At this point, we can install the
pioarduino IDE
extension on VS Code. Open VS Code and click on the
Extensions
icon or click
Ctrl
+
Shift
+
to open the
Extensions
tab.
Search for “pioarduino”. Select the first option and click the
Install
button. The installation may take some time.
While installing pioarduino extension, you’ll be prompted with a similar screen, you need to press the button “
Trust Publisher & Install
“.
Finally, you might be asked to install the pioarduino Core CLI, if this option appears you need to install it.
After that, the pioarduino icon should show up on the left sidebar as well as a Home icon that redirects you to pioarduino Home. If you’ve worked with PlatformIO before, you’ll see that pioarduino looks the same.
That’s it, the pioarduino IDE extension was added to VS Code.
If you don’t see the pioarduino icon and the Home icon at the bottom, you may need to restart VS Code for the changes to take effect.
Either way, we recommend restarting VS Code before proceeding.
Visual Studio Quick Interface Overview
The next image illustrates the meaning of each icon on the left and bottom sidebars and respective shortcuts:
File explorer
Source code management (using gist)
Launch and debug your code
Manage extensions
To see all available commands, press
Ctrl+Shift+P
or go to
View > Command Palette
. If you don’t know where a command is or its shortcut, simply search for it in the Command Palette.
pioarduino IDE Overview
For you to get an overview of how pioarduino works on VS code, we’ll show you how to create, save, and upload a “
Blinking LED
” sketch to your ESP32 board.
Create a New Project
In VS Code, click on the pioarduino
icon. Click on
+ New Project
to start a new project.
Give your project a name (for example
Blink_LED
) and select the board you’re using. In our case, we’re using the DOIT ESP32 DEVKIT V1. The Framework should be “
Arduino
” to use the Arduino core.
You can choose the default location to save your project or a custom location. The default location is in this path: Documents > PlatformIO > Projects. For this test, you can use the default locati
pioarduino IDE
extension. The pioarduino IDE extension supports the latest Arduino core for the ESP32 (version 3). We cover how to install the software on Windows, Mac OS X or Linux Ubuntu operating systems.
The PlatformIO extension used in earlier tutorials is now deprecated. To program the ESP32 in VS Code with the latest core version, we recommend using the
pioarduino
extension instead.
PlatformIO IDE and pioarduino IDE Extensions
The pioarduino extension is a fork of the PlatformIO extension maintained by the community that adds support for the latest Arduino core updates for the ESP32.
In earlier tutorials, we used the PlatformIO extension. However, it doesn’t support the latest ESP32 Arduino Core (v3). To address this, the community created
pioarduino
, a fork that supports the newest core. We’re now using
pioarduino IDE
instead—if you’re familiar with PlatformIO, it works the same way.
How to Program the ESP32 with VS Code and the Latest Arduino Core (version 3)?
If you’re already familiar with programming the ESP32 with VS Code, you can read this quick answer; otherwise, follow the complete tutorial afterwards.
Quick answer:
1)
Install the
pioarduino IDE
extension on VS Code.
2)
Add the following line to the platformio.ini file:
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
This line specifies a custom version of the Espressif 32 platform, maintained by
pioarduino IDE
, that supports the latest ESP32 Arduino core. Unlike the default PlatformIO Espressif 32 platform (which you would normally define as
platform = espressif32
), this URL ensures compatibility with version 3 of the ESP32 core.
Installing VS Code
Follow the next instructions to install VS Code on your Operating System:
A)
Windows
B)
MacOS X
C)
Linux
A) Installing VS Code on Windows (Visual Studio Code)
Go to
code.visualstudio.com
and download the stable build for your operating system (Windows).
Click on the installation wizard to start the installation and follow all the steps to complete the installation. Accept the agreement and press the
Next
button.
Select the following options and click
Next
Press the
Install
button.
Finally, click
Finish
to finish the installation.
Open VS Code, and you’ll be greeted by a Welcome tab with the released notes of the newest version.
That’s it. Visual Studio Code was successfully installed.
B) Installing VS Code on Mac OS X (Visual Studio Code)
Go to
code.visualstudio.com
and download the stable build for your operating system (Mac OS X).
After downloading the Visual Studio Code application file, you’ll be prompted with the following message. Press the “
Open
” button.
Or open your Downloads folder and open Visual Studio Code.
After that, you’ll be greeted by a Welcome tab with the released notes of the newest version.
That’s it. Visual Studio Code was successfully installed.
C) Installing VS Code on Linux Ubuntu (Visual Studio Code)
Go to
code.visualstudio.com
and download the stable build for your operating system (Linux Ubuntu).
Save the installation file:
To install it, open a Terminal window, navigate to your Downloads folder and run the following command to install VS Code.
$ cd Downloads
~/Downloads $ sudo apt install ./code_1.49.1-1600299189_amd64.deb
When the installation is finished, VS Code should be available in your applications menu.
Open VS Code, and you’ll be greeted by a Welcome tab with the released notes of the newest version.
That’s it. Visual Studio Code was successfully installed.
Installing Python on Windows
To program the ESP32 with pioarduino, you need Python 3.5 or a later version installed on your computer. Follow the instructions according to your operating system:
A) Installing Python on Windows
B) Installing Python on MacOS
C) Installing Python on Ubuntu Linux
A) Installing Python on Windows
Go to
python.org/downloads
and download Python 3.13.3 or a later version.
Open the downloaded file to start the Python installation wizard. The following windows show up.
Important:
make sure you check the option
Add Python to PATH
. Then, you can click on the
Install Now
button. You may also need to check the “Use admin privileges when installing py.exe”.
If the installation is successful, you’ll get the following message.
Finally, click the
Close
button.
Installing Python on Mac OS X
Open a Terminal window. You can open it through Spotlight Search. To launch Spotlight, click the small magnifying glass icon in your menu bar (or press
Cmd
+
Space
).
Then, type “terminal” and click on the Terminal icon to launch it.
To install Python, I’ll be using
Homebrew
. If you don’t have the
brew
command available, type the next command in the Terminal window:
/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)\"
Here’s how it looks on the Terminal window:
Then, run the brew command to install Python 3.13:
brew install python3
Here’s how it looks on the Terminal window:
Now, you can proceed to
this section to install the pioarduino extension
Installing Python on Linux Ubuntu
To program the ESP32 boards with pioarduino IDE, you need Python 3.5 or a later version installed on your computer.
Open the Terminal window and check that you already have Python 3 installed. Run the following command:
python3 --version
It should return the current installed version:
python 3.13.3
If you don’t have Python installed, run the next command to install it:
sudo apt install python3
Whether you already have Python installed or not, you need to run the following command to install Python utilities.
sudo apt install python3-distutils
Installing the pioarduino IDE Extension
At this point, we can install the
pioarduino IDE
extension on VS Code. Open VS Code and click on the
Extensions
icon or click
Ctrl
+
Shift
+
to open the
Extensions
tab.
Search for “pioarduino”. Select the first option and click the
Install
button. The installation may take some time.
While installing pioarduino extension, you’ll be prompted with a similar screen, you need to press the button “
Trust Publisher & Install
“.
Finally, you might be asked to install the pioarduino Core CLI, if this option appears you need to install it.
After that, the pioarduino icon should show up on the left sidebar as well as a Home icon that redirects you to pioarduino Home. If you’ve worked with PlatformIO before, you’ll see that pioarduino looks the same.
That’s it, the pioarduino IDE extension was added to VS Code.
If you don’t see the pioarduino icon and the Home icon at the bottom, you may need to restart VS Code for the changes to take effect.
Either way, we recommend restarting VS Code before proceeding.
Visual Studio Quick Interface Overview
The next image illustrates the meaning of each icon on the left and bottom sidebars and respective shortcuts:
File explorer
Source code management (using gist)
Launch and debug your code
Manage extensions
To see all available commands, press
Ctrl+Shift+P
or go to
View > Command Palette
. If you don’t know where a command is or its shortcut, simply search for it in the Command Palette.
pioarduino IDE Overview
For you to get an overview of how pioarduino works on VS code, we’ll show you how to create, save, and upload a “
Blinking LED
” sketch to your ESP32 board.
Create a New Project
In VS Code, click on the pioarduino
icon. Click on
+ New Project
to start a new project.
Give your project a name (for example
Blink_LED
) and select the board you’re using. In our case, we’re using the DOIT ESP32 DEVKIT V1. The Framework should be “
Arduino
” to use the Arduino core.
You can choose the default location to save your project or a custom location. The default location is in this path: Documents > PlatformIO > Projects. For this test, you can use the default locati
Technologies used
Hardware components
- ESP32
- Arduino
Software & tools
- Arduino IDE
- VS Code
- PlatformIO
- PlatformIO
What you get
- Working project / hardware kit, tested before delivery
- Complete source code with explanation
- Project demo and guidance for your viva
- Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed.
Payment is in two parts:
• 50% advance to start the project
• Remaining 50% before delivery
Note:
• Documentation and PPT are not included by default
• If you need documentation/PPT, it can be arranged for extra time and cost
We'll confirm the exact timeline and cost with you after reviewing your requirements.