Today we’ll look at how to set up a PlatformIO in Visual Studio code. You might be wondering, “Why aren’t we using the Arduino IDE?” This is because the Arduino IDE works well for small applications. This does not imply that we cannot code large applications on it; we can, but there are a few drawbacks. The PlatformIO Completely eliminates this drawback. It has features like auto-completion and error-checking while you are coding. and You don’t need to download any libraries; you just need to provide the GitHub link to that repo.
So we will start by downloading and installing Visual Studio Code. PLATFORM IO is a Visual Studio code extension, and we will be using it.
i) Visual Studio Code Installation in Windows 10
We will be downloading the Visual Studio code through the official website; you need to visit this link: https://code.visualstudio.com/download.
After visiting that link, you just need to select your operating system and click on that. You will be redirected to the download page. and it will start downloading.
Now you need to open the download file, and a pop-up application will appear. Accept the agreement and proceed with the installation.
We are now ready to run a Visual Studio code; simply click Finish to launch your Visual Studio code.
Installing PlatformIO IDE Extension on VS Code
Steps:-
1) Click on the Extension Icon or CTRL+SHIFT+X Icon to open the Extension Tab
2) Search For “PlatformIO IDE”
3) Select the first option. See my screenshot below.Click Install (Wait for Installation to Finish).
After Installing make sure it’s enabled.
Now PlatformIO is installed. An icon will appear in the left sidebar of Visual Studio Code.
And you will also notice a home icon has been added to the bottom of the Visual Studio code.
- You need to click on that.
- The interface will look like this: Click on “New Project.”
- The project wizard will appear, prompting you to enter a project name.
- Now you need to provide a board name for ESP32. It should be “DOIT ESP32 DEVKIT V1.”
- Framework:- Arduino
- Location: You can save the project file anywhere you want, or you can use the default location.
- Now Click on Finish.
Now It will take some time to load because it will download all the available resources for the board.
As you see we have selected a default location that will be C:\Users\{username}\Documents\PlatformIO\Projects” so you see in this folder all your projects . To know your pc username you can type “whoami” in the CMD
No Comments