Hello,
Since a few month, I’ve migrate my development from Notepadd++ and Arduino IDE to Visual Studio Code with Platform IO IDE.
Platform IO is an IDE extension to Visual Studio Code. So with this environment, you can develop code for a lot of development board, exactly like Arduino IDE.
But Platform IO has many advantage compare to Arduino IDE. First, the text editor Visual Studio Code is much more efficient than Arduino text editor:
- More powerfull autocompletion,
- Background error checking: so most of syntax error are live reported, before compiling the scetch
- When you call a function, the text editor directly display the parameter that the function need
- By right click on a function, you can easily go to the declaration, the definition etc…
And a lot more other function.
But the most powerfull part is the projet management from platform IO.
With platform IO, when you create a projet, you choose the board of your project. The Platform IO will automatically configure the environment for this board. If this is the first time you use this board, all the required file, library and dependency are automatically downloaded.
You have inside your project a file call platform.ini, to configure your projet. Like: configure the serial monitor speed. So every time you open the serial monitor, he is configured according to your project.
You need a library for your projet ? Just add lines intos your platformio.ini file and platformio automatically download it. And library can be managed globaly (so available for all project) or locally (available only for the current project); So if for projects you need differents version of the same library, it’s easy to manage.
And as the environment developpment is configure with your projet, managing project on differents board become easy. Open our project for Arduino Nano: PlatformIO is automatically configured for Arduino Nano. Then you swith to your ESP32 porjet: just open your project for ESP32 and PlatformIO automatically reconfigure to ESP32.
So when you switch from a board to an other, you don’t have to reconfigure manually your IDE like Arduino IDE.
Here is some video who will better illustrate all the advantages of this platform compare to Arduino IDE:
-
In English:
#264 PlatformIO for Arduino, ESP8266, and ESP32 Tutorial - YouTube -
In french:
VS Code et PlatformIO: Mieux que l'IDE Arduino? - YouTube
Débuter en C++ avec Arduino : Installer VS Code et PlatformIO pour programmer plus efficacement - YouTube
Drawback: harder to grasp for beginners.
Math