{"id":169287,"date":"2025-05-01T13:09:41","date_gmt":"2025-05-01T13:09:41","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=169287"},"modified":"2025-05-02T09:36:29","modified_gmt":"2025-05-02T09:36:29","slug":"vs-code-pioarduino-ide-esp32","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/vs-code-pioarduino-ide-esp32\/","title":{"rendered":"VS Code and pioarduino IDE: Programming the ESP32 (Windows, Mac OS X, Linux)"},"content":{"rendered":"\n<p>Learn how to program the ESP32 boards using VS Code (Microsoft Visual Studio Code) with the <strong>pioarduino IDE<\/strong> 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.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/ESP32-VS-Code-pioarduino.jpg?resize=1200%2C675&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Getting Started Guide VS Code and pioarduino IDE Programming the ESP32 Windows, Mac OS X Linux\" class=\"wp-image-169365\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/ESP32-VS-Code-pioarduino.jpg?w=1920&amp;quality=100&amp;strip=all&amp;ssl=1 1920w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/ESP32-VS-Code-pioarduino.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/ESP32-VS-Code-pioarduino.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/ESP32-VS-Code-pioarduino.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/ESP32-VS-Code-pioarduino.jpg?resize=1536%2C864&amp;quality=100&amp;strip=all&amp;ssl=1 1536w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n<p>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 <strong>pioarduino<\/strong> extension instead.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PlatformIO IDE and pioarduino IDE Extensions<\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>In earlier tutorials, we used the PlatformIO extension. However, it doesn\u2019t support the latest ESP32 Arduino Core (v3). To address this, the community created <strong>pioarduino<\/strong>, a fork that supports the newest core. We&#8217;re now using <strong>pioarduino IDE<\/strong> instead\u2014if you&#8217;re familiar with PlatformIO, it works the same way.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Program the ESP32 with VS Code and the Latest Arduino Core (version 3)?<\/h2>\n\n\n\n<p>If you&#8217;re already familiar with programming the ESP32 with VS Code, you can read this quick answer; otherwise, follow the complete tutorial afterwards.<\/p>\n\n\n\n<p><strong>Quick answer:<\/strong><\/p>\n\n\n\n<p><strong>1) <\/strong>Install the <strong>pioarduino IDE <\/strong>extension on VS Code.<\/p>\n\n\n\n<p><strong>2)<\/strong> Add the following line to the platformio.ini file:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>platform = https:\/\/github.com\/pioarduino\/platform-espressif32\/releases\/download\/stable\/platform-espressif32.zip<\/code><\/pre>\n\n\n\n<p>This line specifies a custom version of the Espressif 32 platform, maintained by <strong>pioarduino IDE<\/strong>, that supports the latest ESP32 Arduino core. Unlike the default PlatformIO Espressif 32 platform (which you would normally define as <span class=\"rnthl rntliteral\">platform = espressif32<\/span>), this URL ensures compatibility with version 3 of the ESP32 core.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-vs-code\">Installing VS Code<\/h2>\n\n\n\n<p>Follow the next instructions to install VS Code on your Operating System:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A) <a href=\"#vs-code-windows\">Windows<\/a><\/li>\n\n\n\n<li>B) <a href=\"#vs-code-macosx\">MacOS X<\/a><\/li>\n\n\n\n<li>C) <a href=\"#vs-code-linux\">Linux<\/a><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"vs-code-windows\">A) Installing VS Code on Windows (Visual Studio Code)<\/h4>\n\n\n\n<p>Go to <a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">code.visualstudio.com<\/a> and download the stable build for your operating system (Windows).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"750\" height=\"569\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/09\/Download-VS-Code.jpg?resize=750%2C569&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Download VS Code for Windows\" class=\"wp-image-169218\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/09\/Download-VS-Code.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/09\/Download-VS-Code.jpg?resize=300%2C228&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Click on the installation wizard to start the installation and follow all the steps to complete the installation. Accept the agreement and press the <strong>Next <\/strong>button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"598\" height=\"464\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Install-VS-Code.png?resize=598%2C464&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Installation wizard\" class=\"wp-image-99206\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Install-VS-Code.png?w=598&amp;quality=100&amp;strip=all&amp;ssl=1 598w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Install-VS-Code.png?resize=300%2C233&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/figure><\/div>\n\n\n<p>Select the following options and click <strong>Next<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"598\" height=\"464\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Install-VS-Code.png?resize=598%2C464&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Installation wizard step 2\" class=\"wp-image-99207\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Install-VS-Code.png?w=598&amp;quality=100&amp;strip=all&amp;ssl=1 598w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Install-VS-Code.png?resize=300%2C233&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/figure><\/div>\n\n\n<p>Press the <strong>Install <\/strong>button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"598\" height=\"464\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/4-Install-VS-Code.png?resize=598%2C464&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Installation wizard step 3\" class=\"wp-image-99208\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/4-Install-VS-Code.png?w=598&amp;quality=100&amp;strip=all&amp;ssl=1 598w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/4-Install-VS-Code.png?resize=300%2C233&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/figure><\/div>\n\n\n<p>Finally, click <strong>Finish <\/strong>to finish the installation.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"598\" height=\"464\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Install-VS-Code.png?resize=598%2C464&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Installation wizard final step\" class=\"wp-image-99204\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Install-VS-Code.png?w=598&amp;quality=100&amp;strip=all&amp;ssl=1 598w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Install-VS-Code.png?resize=300%2C233&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/figure><\/div>\n\n\n<p>Open VS Code, and you\u2019ll be greeted by a Welcome tab with the released notes of the newest version.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"558\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/09\/1-VS-Code-Welcome-screen.jpg?resize=750%2C558&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Welcome Screen\" class=\"wp-image-169220\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/09\/1-VS-Code-Welcome-screen.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/09\/1-VS-Code-Welcome-screen.jpg?resize=300%2C223&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>That\u2019s it. Visual Studio Code was successfully installed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"vs-code-macosx\">B) Installing VS Code on Mac OS X (Visual Studio Code)<\/h3>\n\n\n\n<p>Go to <a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">code.visualstudio.com<\/a> and download the stable build for your operating system (Mac OS X).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1167\" height=\"592\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-download-Mac-OS-X.png?resize=1167%2C592&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Download Page for Mac OS X\" class=\"wp-image-99336\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-download-Mac-OS-X.png?w=1167&amp;quality=100&amp;strip=all&amp;ssl=1 1167w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-download-Mac-OS-X.png?resize=300%2C152&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-download-Mac-OS-X.png?resize=1024%2C519&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-download-Mac-OS-X.png?resize=768%2C390&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1167px) 100vw, 1167px\" \/><\/figure><\/div>\n\n\n<p>After downloading the Visual Studio Code application file, you&#8217;ll be prompted with the following message. Press the &#8220;<strong>Open<\/strong>&#8221; button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"487\" height=\"158\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-save-file.png?resize=487%2C158&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Downloading application file for Mac OS X\" class=\"wp-image-99338\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-save-file.png?w=487&amp;quality=100&amp;strip=all&amp;ssl=1 487w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-save-file.png?resize=300%2C97&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 487px) 100vw, 487px\" \/><\/figure><\/div>\n\n\n<p>Or open your Downloads folder and open Visual Studio Code.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"214\" height=\"140\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/4-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-file-downloaded-Mac-OS-X.png?resize=214%2C140&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Downloading application file for Mac OS X\" class=\"wp-image-99337\"\/><\/figure><\/div>\n\n\n<p>After that, you\u2019ll be greeted by a Welcome tab with the released notes of the newest version.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"767\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-installed.png?resize=1024%2C767&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Installation wizard welcome screen on Max OS X\" class=\"wp-image-99339\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-installed.png?w=1024&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-installed.png?resize=300%2C225&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-installed.png?resize=768%2C575&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>That\u2019s it. Visual Studio Code was successfully installed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"vs-code-linux\">C) Installing VS Code on Linux Ubuntu (Visual Studio Code)<\/h3>\n\n\n\n<p>Go to <a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">code.visualstudio.com<\/a> and download the stable build for your operating system (Linux Ubuntu).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"961\" height=\"438\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu.png?resize=961%2C438&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Download Page for Linux Ubuntu\" class=\"wp-image-99324\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu.png?w=961&amp;quality=100&amp;strip=all&amp;ssl=1 961w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu.png?resize=300%2C137&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu.png?resize=768%2C350&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 961px) 100vw, 961px\" \/><\/figure><\/div>\n\n\n<p>Save the installation file:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"495\" height=\"350\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/4-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu.png?resize=495%2C350&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Save installation file for Linux Ubuntu\" class=\"wp-image-99325\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/4-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu.png?w=495&amp;quality=100&amp;strip=all&amp;ssl=1 495w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/4-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu.png?resize=300%2C212&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 495px) 100vw, 495px\" \/><\/figure><\/div>\n\n\n<p>To install it, open a Terminal window, navigate to your Downloads folder and run the following command to install VS Code.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ cd Downloads\n~\/Downloads $ sudo apt install .\/code_1.49.1-1600299189_amd64.deb<\/code><\/pre>\n\n\n\n<p>When the installation is finished, VS Code should be available in your applications menu.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"516\" height=\"326\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-run-VS-Code-Linux-Ubuntu.png?resize=516%2C326&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Open application Linux Ubuntu\" class=\"wp-image-99326\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-run-VS-Code-Linux-Ubuntu.png?w=516&amp;quality=100&amp;strip=all&amp;ssl=1 516w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-run-VS-Code-Linux-Ubuntu.png?resize=300%2C190&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 516px) 100vw, 516px\" \/><\/figure><\/div>\n\n\n<p>Open VS Code, and you\u2019ll be greeted by a Welcome tab with the released notes of the newest version.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"632\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu-Testing.png?resize=1024%2C632&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Installation wizard welcome screen on Linux Ubuntu\" class=\"wp-image-99327\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu-Testing.png?w=1024&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu-Testing.png?resize=300%2C185&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu-Testing.png?resize=768%2C474&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>That\u2019s it. Visual Studio Code was successfully installed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing Python on Windows<\/h2>\n\n\n\n<p>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:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#installing-python-windows\" title=\"\">A) Installing Python on Windows<\/a><\/li>\n\n\n\n<li><a href=\"#install-python-macos\" title=\"\">B) Installing Python on MacOS<\/a><\/li>\n\n\n\n<li><a href=\"#install-python-linux\" title=\"\">C) Installing Python on Ubuntu Linux<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installing-python-windows\">A) Installing Python on Windows<\/h3>\n\n\n\n<p>Go to <a href=\"https:\/\/www.python.org\/downloads\/\" target=\"_blank\" rel=\"noopener\" title=\"\">python.org\/downloads<\/a> and download Python 3.13.3 or a later version.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"429\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/download-python-for-windows.png?resize=750%2C429&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Download Python for Windows\" class=\"wp-image-169311\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/download-python-for-windows.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/download-python-for-windows.png?resize=300%2C172&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Open the downloaded file to start the Python installation wizard. The following windows show up.<\/p>\n\n\n\n<p><strong>Important:<\/strong> make sure you check the option <strong>Add Python to PATH<\/strong>. Then, you can click on the <strong>Install Now<\/strong> button. You may also need to check the &#8220;Use admin privileges when installing py.exe&#8221;.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"656\" height=\"405\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/add-python-path-installation.png?resize=656%2C405&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"add python to path - installation\" class=\"wp-image-169312\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/add-python-path-installation.png?w=656&amp;quality=100&amp;strip=all&amp;ssl=1 656w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/add-python-path-installation.png?resize=300%2C185&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/figure><\/div>\n\n\n<p>If the installation is successful, you&#8217;ll get the following message.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"656\" height=\"405\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Python-setup-successful.png?resize=656%2C405&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Python installation successful\" class=\"wp-image-169313\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Python-setup-successful.png?w=656&amp;quality=100&amp;strip=all&amp;ssl=1 656w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Python-setup-successful.png?resize=300%2C185&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/figure><\/div>\n\n\n<p>Finally, click the <strong>Close<\/strong> button.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-python-macos\">Installing Python on Mac OS X<\/h3>\n\n\n\n<p>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 <strong>Cmd<\/strong>+<strong>Space<\/strong>).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"674\" height=\"70\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Mac-OS-spotlight.png?resize=674%2C70&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"MacOS spotlight\" class=\"wp-image-169316\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Mac-OS-spotlight.png?w=674&amp;quality=100&amp;strip=all&amp;ssl=1 674w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Mac-OS-spotlight.png?resize=300%2C31&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 674px) 100vw, 674px\" \/><\/figure><\/div>\n\n\n<p>Then, type &#8220;terminal&#8221; and click on the Terminal icon to launch it.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"114\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/mac-os-launch-terminal.png?resize=750%2C114&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Mac OS Launch terminal\" class=\"wp-image-169318\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/mac-os-launch-terminal.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/mac-os-launch-terminal.png?resize=300%2C46&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>To install Python, I&#8217;ll be using <em>Homebrew<\/em>. &nbsp;If you don&#8217;t have the <em>brew<\/em> command available, type the next command in the Terminal window:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/bin\/bash -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install.sh)\"<\/code><\/pre>\n\n\n\n<p>Here&#8217;s how it looks on the Terminal window:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"860\" height=\"110\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/image.png?resize=860%2C110&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-169320\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/image.png?w=860&amp;quality=100&amp;strip=all&amp;ssl=1 860w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/image.png?resize=300%2C38&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/image.png?resize=768%2C98&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/figure><\/div>\n\n\n<p>Then, run the brew command to install Python 3.13:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>brew install python3<\/code><\/pre>\n\n\n\n<p>Here&#8217;s how it looks on the Terminal window:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"632\" height=\"210\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-install-Python3.png?resize=632%2C210&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code installing Python 3 with brew command\" class=\"wp-image-99335\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-install-Python3.png?w=632&amp;quality=100&amp;strip=all&amp;ssl=1 632w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-install-Python3.png?resize=300%2C100&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 632px) 100vw, 632px\" \/><\/figure><\/div>\n\n\n<p>Now, you can proceed to <a href=\"#install-pioarduino\" title=\"\">this section to install the pioarduino extension<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-python-linux\">Installing Python on Linux Ubuntu<\/h3>\n\n\n\n<p>To program the ESP32 boards with pioarduino IDE, you need Python 3.5 or a later version installed on your computer.<\/p>\n\n\n\n<p>Open the Terminal window and check that you already have Python 3 installed. Run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>python3 --version<\/strong><\/code><\/pre>\n\n\n\n<p>It should return the current installed version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python 3.13.3<\/code><\/pre>\n\n\n\n<p>If you don&#8217;t have Python installed, run the next command to install it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install python3<\/code><\/pre>\n\n\n\n<p>Whether you already have Python installed or not, you need to run the following command to install Python utilities.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install python3-distutils<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"452\" height=\"91\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-Python3-installed-distutils.png?resize=452%2C91&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Installing python3-distutils Linux Ubuntu for PlatformIO IDE\" class=\"wp-image-99323\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-Python3-installed-distutils.png?w=452&amp;quality=100&amp;strip=all&amp;ssl=1 452w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-Python3-installed-distutils.png?resize=300%2C60&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 452px) 100vw, 452px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"install-pioarduino\">Installing the pioarduino IDE Extension<\/h2>\n\n\n\n<p>At this point, we can install the <strong>pioarduino IDE<\/strong> extension on VS Code. Open VS Code and click on the <strong>Extensions<\/strong> icon or click <strong>Ctrl<\/strong>+<strong>Shift<\/strong>+<strong>X<\/strong> to open the <strong>Extensions<\/strong> tab.<\/p>\n\n\n\n<p>Search for &#8220;pioarduino&#8221;.&nbsp;Select the first option and click the <strong>Install<\/strong> button. The installation may take some time.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"431\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/installing-pioarduino-VS-Code.jpg?resize=750%2C431&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Installing pioarduino extension VS Code\" class=\"wp-image-169314\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/installing-pioarduino-VS-Code.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/installing-pioarduino-VS-Code.jpg?resize=300%2C172&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>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\u2019ve worked with PlatformIO before, you\u2019ll see that pioarduino looks the same.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"462\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-extension-installed.jpg?resize=750%2C462&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"pioarduino extension installed\" class=\"wp-image-169315\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-extension-installed.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-extension-installed.jpg?resize=300%2C185&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>That&#8217;s it, the pioarduino IDE extension was added to VS Code.<\/p>\n\n\n\n<p>If you don&#8217;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.<\/p>\n\n\n\n<p>Either way, we recommend restarting VS Code before proceeding.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Visual Studio Quick Interface Overview<\/h2>\n\n\n\n<p>The next image illustrates the meaning of each icon on the left and bottom sidebars and respective shortcuts:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"897\" height=\"495\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/VS-Code-Interface-Overview.png?resize=897%2C495&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Interface Overview\" class=\"wp-image-99223\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/VS-Code-Interface-Overview.png?w=897&amp;quality=100&amp;strip=all&amp;ssl=1 897w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/VS-Code-Interface-Overview.png?resize=300%2C166&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/VS-Code-Interface-Overview.png?resize=768%2C424&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 897px) 100vw, 897px\" \/><\/figure><\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>File explorer<\/li>\n\n\n\n<li>Search across files<\/li>\n\n\n\n<li>Source code management (using gist)<\/li>\n\n\n\n<li>Launch and debug your code<\/li>\n\n\n\n<li>Manage extensions<\/li>\n<\/ul>\n\n\n\n<p>To see all available commands, press <strong>Ctrl+Shift+P<\/strong> or go to <strong>View &gt; Command Palette<\/strong>. If you don&#8217;t know where a command is or its shortcut, simply search for it in the Command Palette.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">pioarduino IDE Overview<\/h2>\n\n\n\n<p>For you to get an overview of how pioarduino works on VS code, we&#8217;ll show you how to create, save, and upload a &#8220;<em>Blinking LED<\/em>&#8221; sketch to your ESP32 board.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Create a New Project<\/h3>\n\n\n\n<p>In VS Code, click on the pioarduino <strong>Home<\/strong> icon. Click on <strong>+ New Project<\/strong> to start a new project.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"857\" height=\"485\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/create-new-project-pioarduino.jpg?resize=857%2C485&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Create New Project pioarduino\" class=\"wp-image-169321\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/create-new-project-pioarduino.jpg?w=857&amp;quality=100&amp;strip=all&amp;ssl=1 857w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/create-new-project-pioarduino.jpg?resize=300%2C170&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/create-new-project-pioarduino.jpg?resize=768%2C435&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 857px) 100vw, 857px\" \/><\/figure><\/div>\n\n\n<p>Give your project a name (for example <em>Blink_LED<\/em>) and select the board you&#8217;re using. In our case, we&#8217;re using the DOIT ESP32 DEVKIT V1. The Framework should be &#8220;<strong>Arduino<\/strong>&#8221; to use the Arduino core.<\/p>\n\n\n\n<p>You can choose the default location to save your project or a custom location. The default location is in this path: Documents &gt; PlatformIO &gt; Projects. For this test, you can use the default location. Finally, press the &#8220;<strong>Finish<\/strong>&#8221; button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"598\" height=\"470\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-project-wizzard.png?resize=598%2C470&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"pioarduino project wizzard\" class=\"wp-image-169322\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-project-wizzard.png?w=598&amp;quality=100&amp;strip=all&amp;ssl=1 598w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-project-wizzard.png?resize=300%2C236&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/figure><\/div>\n\n\n<p>For this example, we&#8217;ll be using the DOIT ESP32 DEVKIT board. If this is your first time using VS Code with the ESP32, VS Code will download additional data about the selected board after clicking the <strong>Finish<\/strong> button.<\/p>\n\n\n\n<p>The <em>Blink_LED<\/em> project should be accessible from the <strong>Explorer<\/strong> tab.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"439\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/blink-LED-project-VS-Code-pioarduino.png?resize=750%2C439&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Blink LED project created on pioarduino\" class=\"wp-image-169323\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/blink-LED-project-VS-Code-pioarduino.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/blink-LED-project-VS-Code-pioarduino.png?resize=300%2C176&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>VS Code and pioarduino have a folder structure that is different from the standard <em>.ino<\/em> project. If you click on the <strong>Explorer<\/strong> tab, you&#8217;ll see all the files it created under your project folder. It may seem like a lot of files to work with. But, don&#8217;t worry. Usually, you&#8217;ll just need to work with one or two of those files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">pioarduino Tasks<\/h3>\n\n\n\n<p>After creating a pioarduino project (or opening an existing project), the pioarduino commands will show up in a blue bar at the bottom.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"201\" height=\"19\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-commands.png?resize=201%2C19&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"pioarduino commands\" class=\"wp-image-169324\" style=\"width:307px;height:auto\"\/><\/figure><\/div>\n\n\n<p>Here&#8217;s the meaning of each icon from left to right:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>pioarduino Home<\/li>\n\n\n\n<li>Build\/Compile<\/li>\n\n\n\n<li>Upload<\/li>\n\n\n\n<li>Clean<\/li>\n\n\n\n<li>Test<\/li>\n\n\n\n<li>Serial Monitor<\/li>\n\n\n\n<li>New Terminal<\/li>\n<\/ul>\n\n\n\n<p>The taskbar only shows up when you are working on a pioarduino project. If no pioarduino project is open, the blue bar doesn&#8217;t show up by default in VS Code.<\/p>\n\n\n\n<p>If you hover your mouse over the icons, it will show what each icon does. Alternatively, you can also click on the pioarduino icon to see all the Project tasks.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"462\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-project-tasks.png?resize=750%2C462&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"pioarduino project tasks\" class=\"wp-image-169325\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-project-tasks.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-project-tasks.png?resize=300%2C185&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>If the tasks don&#8217;t show up on your IDE when you click the icon, you may need to click on the three-dot icon at the top and enable the Project tasks, as shown below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"319\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-enable-project-tasks.png?resize=750%2C319&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"pioarduino enable project tasks\" class=\"wp-image-169326\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-enable-project-tasks.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-enable-project-tasks.png?resize=300%2C128&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">platformio.ini file<\/h3>\n\n\n\n<p>The <span class=\"rnthl rntliteral\">platformio.ini<\/span> file is the pioarduino Configuration File for your project. It shows the platform, board, and framework for your project. You can also add other configurations like libraries to be included, upload options, changing the Serial Monitor baud rate, and other configurations.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"451\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/platform-ini-file-pioarduino.jpg?resize=750%2C451&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"platform.ini file pioarduino\" class=\"wp-image-169327\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/platform-ini-file-pioarduino.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/platform-ini-file-pioarduino.jpg?resize=300%2C180&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<ul class=\"wp-block-list\">\n<li><span class=\"rnthl rntliteral\">platform<\/span>: which corresponds to the SoC (system on a chip) used by the board. To use the latest version of the Arduino core for the ESP32, you just replace the default espressif32 with the following:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>platform = https:\/\/github.com\/pioarduino\/platform-espressif32\/releases\/download\/stable\/platform-espressif32.zip<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span class=\"rnthl rntliteral\">board<\/span>: the development board you&#8217;re using.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span class=\"rnthl rntliteral\">framework<\/span>: the software environment that will run the project code.<\/li>\n<\/ul>\n\n\n\n<p>If you want to use a baud rate of 115200 in your Serial Monitor, you need to add the following line to your <span class=\"rnthl rntliteral\">platformio.ini<\/span> file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>monitor_speed = 115200<\/code><\/pre>\n\n\n\n<p>So, it will be like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;env:esp32doit-devkit-v1]\nplatform = https:\/\/github.com\/pioarduino\/platform-espressif32\/releases\/download\/stable\/platform-espressif32.zip\nboard = esp32doit-devkit-v1\nframework = arduino\nmonitor_speed = 115200<\/code><\/pre>\n\n\n\n<p>After that, make sure you save the changes made to the file by pressing <strong>Ctrl<\/strong>+<strong>S<\/strong>.<\/p>\n\n\n\n<p>In this file, you can also add libraries that you want to include in your project. pioarduino will download the libraries and all their dependencies automatically. We&#8217;ll take a look at this subject later.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">src folder<\/h3>\n\n\n\n<p>The <em>src <\/em>folder is your working folder. Under the <em>src<\/em> folder, there&#8217;s a <span class=\"rnthl rntliteral\">main.cpp<\/span> file. That&#8217;s where you write your code. Click on that file. The structure of an Arduino program should open with the <span class=\"rnthl rntliteral\">setup()<\/span> and <span class=\"rnthl rntliteral\">loop()<\/span> functions.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"347\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-vs-code-src-folder.jpg?resize=750%2C347&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"pioarduino vs code src folder\" class=\"wp-image-169328\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-vs-code-src-folder.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-vs-code-src-folder.jpg?resize=300%2C139&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p class=\"rntbox rntclgray\">In pioarduino, all your Arduino sketches should start with <span class=\"rnthl rntliteral\">#include &lt;Arduino.h&gt;<\/span>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Uploading Code using pioarduino<\/h3>\n\n\n\n<p>In this section, you&#8217;ll learn how to upload code using pioarduino. As an example, we&#8217;re providing a code that blinks the ESP32 on-board LED every second.<\/p>\n\n\n\n<p>Copy the following code to your <span class=\"rnthl rntliteral\">main.cpp<\/span> file.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/*********\n  Rui Santos &amp; Sara Santos - Random Nerd Tutorials\n  Complete project details at https:\/\/RandomNerdTutorials.com\/vs-code-pioarduino-ide-esp32\/\n*********\/\n\n#include &lt;Arduino.h&gt;\n\n#define LED 2\n\nvoid setup() {\n  \/\/ put your setup code here, to run once:\n  Serial.begin(115200);\n  pinMode(LED, OUTPUT);\n}\n\nvoid loop() {\n  \/\/ put your main code here, to run repeatedly:\n  digitalWrite(LED, HIGH);\n  Serial.println(&quot;LED is on&quot;);\n  delay(1000);\n  digitalWrite(LED, LOW);\n  Serial.println(&quot;LED is off&quot;);\n  delay(1000);\n}\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/ESP32\/ESP32_Blink_VS_Code.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<p>Press <strong>Ctrl<\/strong>+<strong>S<\/strong> or go to <strong>File<\/strong> &gt; <strong>Save<\/strong> to save the file. <\/p>\n\n\n\n<p>Make sure you replace the <span class=\"rnthl rntliteral\">platform<\/span> in your <span class=\"rnthl rntliteral\">platformio.ini<\/span> file with the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>platform = https:\/\/github.com\/pioarduino\/platform-espressif32\/releases\/download\/stable\/platform-espressif32.zip<\/code><\/pre>\n\n\n\n<p>And that you&#8217;ve set the Serial Monitor baud rate to 115200:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>monitor_speed = 115200<\/code><\/pre>\n\n\n\n<p>Save the <span class=\"rnthl rntliteral\">platformio.ini<\/span> file.<\/p>\n\n\n\n<p>Now, you can click the <strong>Upload<\/strong> icon to compile and upload the code. Alternatively, you can go to the <strong>Project Tasks<\/strong> menu and select <strong>Upload<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"536\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/upload-code-pioarduino.jpg?resize=750%2C536&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Upload code to ESP32 pioarduino VS Code\" class=\"wp-image-169329\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/upload-code-pioarduino.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/upload-code-pioarduino.jpg?resize=300%2C214&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p><strong>Important:<\/strong> make sure you close all programs that might be using the ESP serial port. This is, make sure you don&#8217;t have an Arduino IDE window open at the same time.<\/p>\n\n\n\n<p>If the code is successfully uploaded, you should get the following message.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"749\" height=\"236\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-upload-success.jpg?resize=749%2C236&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"pioarduino upload success\" class=\"wp-image-169330\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-upload-success.jpg?w=749&amp;quality=100&amp;strip=all&amp;ssl=1 749w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-upload-success.jpg?resize=300%2C95&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 749px) 100vw, 749px\" \/><\/figure><\/div>\n\n\n<p>After uploading the code, the ESP32 on-board LED should be blinking every second.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/10\/ESP32-board-Built_in-LED-turned-on-HIGH.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 onboard LED blinking\" class=\"wp-image-120420\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/10\/ESP32-board-Built_in-LED-turned-on-HIGH.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/10\/ESP32-board-Built_in-LED-turned-on-HIGH.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Now, click on the Serial Monitor icon, and you should see the current LED state.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"695\" height=\"448\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-serial-monitor-test-esp32.jpg?resize=695%2C448&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"pioarduino testing ESP32 Serial Monitor\" class=\"wp-image-169331\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-serial-monitor-test-esp32.jpg?w=695&amp;quality=100&amp;strip=all&amp;ssl=1 695w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-serial-monitor-test-esp32.jpg?resize=300%2C193&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 695px) 100vw, 695px\" \/><\/figure><\/div>\n\n\n<p><strong>Note:<\/strong> if you don&#8217;t see the Terminal window, go to <strong>Terminal<\/strong> &gt; <strong>New Terminal<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Detect COM Port<\/h3>\n\n\n\n<p>pioarduino will automatically detect the port your board is connected to. To check the connected devices, you can go to the pioarduino <strong>Home<\/strong> and click the <strong>Devices<\/strong> icon.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"498\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/detect-COM-port-VS-Code.jpg?resize=750%2C498&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code - Detect devices COM port\" class=\"wp-image-169353\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/detect-COM-port-VS-Code.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/detect-COM-port-VS-Code.jpg?resize=300%2C199&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<h4 class=\"wp-block-heading\">Installing Drivers<\/h4>\n\n\n\n<p>If you don&#8217;t see your ESP&#8217;s COM port available, it means you don&#8217;t have the drivers installed. Take a closer look at the chip next to the voltage regulator on the board and check its name. The ESP32 DEVKIT V1 DOIT board uses the&nbsp;CP2102 chip. Alternatively, many ESP32 boards also use the CH340 drivers.<\/p>\n\n\n\n<p>After they are installed, restart VS Code, and you should see the COM port in the <strong>Devices<\/strong> menu.<\/p>\n\n\n\n<p>If you\u2019re having trouble installing the CP210x drivers, you can check the following tutorials:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/install-esp32-esp8266-usb-drivers-cp210x-windows\/\">Install ESP32 USB Drivers \u2013 CP210x USB to UART Bridge (Windows PC)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/install-esp32-esp8266-usb-drivers-cp210x-mac-os\/\">Install ESP32 USB Drivers \u2013 CP210x USB to UART Bridge (Mac OS X)<\/a><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Troubleshooting<\/h4>\n\n\n\n<p>If you get the following error while uploading the code: &#8220;<strong><em>Failed to connect to ESP32: Timed out waiting for packet heade<\/em>r<\/strong>&#8221; it usually means that your board is not in flashing mode when you&#8217;re uploading the code.&nbsp;<\/p>\n\n\n\n<p>When this happens, you need to press the ESP32 on-board BOOT button when you start seeing many dots in the debugging window.<\/p>\n\n\n\n<p>For more information about this issue, you can follow this guide:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/solved-failed-to-connect-to-esp32-timed-out-waiting-for-packet-header\/\">[SOLVED] Failed to connect to ESP32: Timed out waiting for packet header<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Changing the Serial Monitor Baud Rate &#8211; pioarduino<\/h3>\n\n\n\n<p>The default baud rate used by pioarduino is 9600. However, it is possible to set a different value. On the <strong>File Explorer<\/strong>, under your project folder, open the <span class=\"rnthl rntliteral\">platformio.ini<\/span> file and add the following line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>monitor_speed = YOUR_DESIRED_BAUD_RATE<\/code><\/pre>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>monitor_speed = 115200<\/code><\/pre>\n\n\n\n<p>After that, save your <span class=\"rnthl rntliteral\">platformio.ini<\/span> file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Installing Libraries on pioarduino<\/h3>\n\n\n\n<p>pioarduino has a powerful built-in Library Manager. It allows you to set custom dependencies per project in the <span class=\"rnthl rntliteral\">platformio.ini<\/span> configuration file using <span class=\"rnthl rntliteral\">lib_deps<\/span>. This tells PlatformIO to automatically download the library and all its dependencies when you save the configuration file or compile your project.<\/p>\n\n\n\n<p>Follow the following procedure if you need to install libraries in pioarduino.<\/p>\n\n\n\n<p>Click the <strong>Home<\/strong> icon to go to pioarduino <strong>Home<\/strong>. Select the <strong>Libraries<\/strong> icon on the left menu. Search for the library you want to install\u2014for example, <strong>Adafruit_BME280<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"824\" height=\"594\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-install-libraries.jpg?resize=824%2C594&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"pioarduino install libraries VS Code\" class=\"wp-image-169355\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-install-libraries.jpg?w=824&amp;quality=100&amp;strip=all&amp;ssl=1 824w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-install-libraries.jpg?resize=300%2C216&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-install-libraries.jpg?resize=768%2C554&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 824px) 100vw, 824px\" \/><\/figure><\/div>\n\n\n<p>Select the library you want to include in your project. Then, click <strong>Add to Project<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"378\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/add-bme280-library-pioarduino-VS-Code.jpg?resize=750%2C378&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Add library to project VS Code\" class=\"wp-image-169356\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/add-bme280-library-pioarduino-VS-Code.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/add-bme280-library-pioarduino-VS-Code.jpg?resize=300%2C151&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Select the project where you want to use the library.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"377\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Add-project-dependency-VS-Code-pioarduino.jpg?resize=700%2C377&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Add project dependency pioarduino VS Code\" class=\"wp-image-169357\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Add-project-dependency-VS-Code-pioarduino.jpg?w=700&amp;quality=100&amp;strip=all&amp;ssl=1 700w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Add-project-dependency-VS-Code-pioarduino.jpg?resize=300%2C162&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n<p>This will add the library identifier using the <span class=\"rnthl rntliteral\">lib_deps<\/span> directive on the <span class=\"rnthl rntliteral\">platformio.ini<\/span> file. If you open your project&#8217;s <span class=\"rnthl rntliteral\">platformio.ini<\/span> file, it should look like the following image.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"539\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/library-added-to-platformio-ini-file-VS-Code.jpg?resize=750%2C539&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Library added to pioarduino VS Code platformio ini file\" class=\"wp-image-169359\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/library-added-to-platformio-ini-file-VS-Code.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/library-added-to-platformio-ini-file-VS-Code.jpg?resize=300%2C216&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Alternatively, on the library window, you can select the <strong>Installation<\/strong> tab and scroll until you see the library&#8217;s identifier. You can choose any of those identifiers depending on the options you want to use. The library&#8217;s identifiers are highlighted in red in the following image.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"749\" height=\"622\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/bme280-install-pioarduino-VS-Code-library-identifier.jpg?resize=749%2C622&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"BME280 Install Library Pioarduino VS Code with library identifier\" class=\"wp-image-169358\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/bme280-install-pioarduino-VS-Code-library-identifier.jpg?w=749&amp;quality=100&amp;strip=all&amp;ssl=1 749w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/bme280-install-pioarduino-VS-Code-library-identifier.jpg?resize=300%2C249&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 749px) 100vw, 749px\" \/><\/figure><\/div>\n\n\n<p>Then, go to the platformio.ini file of your project and paste the library identifier into that file, like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lib_deps = adafruit\/Adafruit BME280 Library@^2.2.4<\/code><\/pre>\n\n\n\n<p>If you need multiple libraries, you can separate their name by a comma or put them on different lines. For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lib_deps =\n  arduino-libraries\/Arduino_JSON @ 0.1.0\n  adafruit\/Adafruit BME280 Library @ ^2.1.0\n  adafruit\/Adafruit Unified Sensor @ ^1.1.4<\/code><\/pre>\n\n\n\n<p>PlatformIO has a built-in powerful Library Manager, that allows you to specify custom dependencies per project in the Project Configuration File&nbsp;<em>platformio.ini<\/em>&nbsp;using&nbsp;lib_deps. This will tell PlatformIO to automatically download the library and all its dependencies when you save the configuration file or when you compile your project.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Open a Project Folder<\/h3>\n\n\n\n<p>To open an existing project folder on pioarduino, open VS Code. Then, go to pioarduino Home and click <strong>Open Project<\/strong>. Navigate through the files and select your project folder.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"488\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-open-project.jpg?resize=750%2C488&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"pioarduino open project\" class=\"wp-image-169360\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-open-project.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/pioarduino-open-project.jpg?resize=300%2C195&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>pioarduino will open all the files within the project folder.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">VS Code Color Themes<\/h3>\n\n\n\n<p>VS Code lets you choose between different color themes. Go to the <strong>Manage<\/strong> icon and select <strong>Color Theme<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"318\" height=\"429\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/VS-Code-color-themes.jpg?resize=318%2C429&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Select Different Color Themes\" class=\"wp-image-169363\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/VS-Code-color-themes.jpg?w=318&amp;quality=100&amp;strip=all&amp;ssl=1 318w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/VS-Code-color-themes.jpg?resize=222%2C300&amp;quality=100&amp;strip=all&amp;ssl=1 222w\" sizes=\"(max-width: 318px) 100vw, 318px\" \/><\/figure><\/div>\n\n\n<p>You can then select from several different light and dark themes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Shortcuts&#8217; List<\/h3>\n\n\n\n<p>For a complete list of VS Code shortcuts for Windows, Mac OS X or Linux, use the following link as a reference:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/code.visualstudio.com\/docs\/getstarted\/keybindings#_keyboard-shortcuts-reference\" target=\"_blank\" rel=\"noopener\" title=\"\">VS Code Keyboard Shortcuts Reference<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>In this tutorial, you learned how to program the ESP32 using VS Code with the pioarduino extension.<\/p>\n\n\n\n<p>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. It supports the latest ESP32 Core version (v3)\u2014while the PlatformIO extension used in previous projects and tutorials is currently deprecated.<\/p>\n\n\n\n<p>We hope you found this guide useful.<\/p>\n\n\n\n<p>We hope you\u2019ve found this tutorial useful. If you like ESP32, check the following resources:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-cam-projects-ebook\/\">Learn ESP32 with Arduino IDE (eBook)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/projects-esp32\/\">More ESP32 Projects and Tutorials\u2026<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"VS Code and pioarduino IDE: Programming the ESP32 (Windows, Mac OS X, Linux)\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/vs-code-pioarduino-ide-esp32\/#more-169287\" aria-label=\"Read more about VS Code and pioarduino IDE: Programming the ESP32 (Windows, Mac OS X, Linux)\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":5,"featured_media":169365,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[276,281,277,299,264],"tags":[],"class_list":["post-169287","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esp32","category-esp32-project","category-esp32-arduino-ide","category-0-esp32","category-project"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/ESP32-VS-Code-pioarduino.jpg?fit=1920%2C1080&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/169287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=169287"}],"version-history":[{"count":10,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/169287\/revisions"}],"predecessor-version":[{"id":169704,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/169287\/revisions\/169704"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/169365"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=169287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=169287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=169287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}