An IoT Mastery Project guide series


Why use PlatformIO? My top-six reasons

In this article, I write about my top five+one reasons why I decided to learn how to use PlatformIO (in no particular order).

In this article, I write about my top five+one reasons why I decided to learn how to use PlatformIO (in no particular order).

Reason 1

The first reason is that my Arduino and ESP32 projects are getting larger. I find that the Arduino IDE is starting to show its constraints, especially because as the projects are getting larger, they are getting more complicated.

PlatformIO, on the other hand, when used with an editor like Atom or MS Code, makes it easy to handle much larger projects.

As you probably know, Microsoft Visual Studio (the commercial version of MS Code) is an integrated development environment that has been used to create gigantic projects (for example, the Microsoft Windows operating systems, and Microsoft Office).

So I'm sure it's going to be able to handle my projects 🙂

Reason 2

The second reason the need for better control of project dependencies.

Again, because my projects are becoming more complicated, I started having more frequent issues with incompatibilities between libraries of different versions.

I needed a way to control my project dependencies in a centralized way, and PlatformIO solves this problem via the project configuration file.

As part of the curriculum of ESP32 Unleashed, I'm going to show you how to use the project configuration file to mark the exact version of a particular library that you want to use or even a particular platform.

Dependencies control is done at the project level, which is awesome. Each project has its own dependencies, and the tool manages them independently of other projects.

Reason 3

The third reason is that in PlatformIO, projects are self-contained.

Everything that you need to compile the project is stored inside the project directory. I can share this directory with other people, and they will be able to work with my project and to compile it.

I can copy it to another computer, and I will be able to get to work immediately, without having to worry about do the setup manually. PlatformIO takes care of that automatically.

Life is so much better when projects are self-contained.

Reason 4

My fourth reason is the amazing integration of the toolchain components.

With PlatformIO and MS Code, I've got the compiler, the terminal, the serial monitor, the version control system, the editor itself, and a lot more, all nicely integrated into a single tool.

This creates a single unified experience for me as a programmer.

When I use the Arduino IDE, I need to have other tools set up, like a separate terminal, and Git for versioning. This just adds to my workload and to the configuration that I have to do.

Reason 5

A very important reason for deciding to use PlatformIO in this project is curiosity.

Where would we be without it?

PlatformIO has been on my radar for more than a year and I decided that I needed a non-trivial project to force me to use it exclusively for several weeks.

Learning by doing is the best way to learn it isn't it?

I admit that it was scary to start with.

When you start work with a powerful tool like PlatformIO, not to mention MS Visual Code, for the first time it is overwhelming because of the steep learning curve.

And this is why I needed a project that was too big for the Arduino IDE. The same project was perfect for PlatformIO. It made me stick with the new tool long enough to understand its power, and actually become fairly capable of using it.

Reason 6

The sixth reason is that I wanted to learn better programming skills and habits.

The Arduino IDE is great for learning electronics and basic programming but I feel that I have become lazy using.

The Arduino IDE is great for hiding a lot of the complexity of programming embedded systems but I began to feel the need for more power.

This is in part due to the power of the ESP32.

The capabilities of the ESP32 are perfect for larger projects, at least larger compared to what we are used to with the Arduino Uno.

And to make those projects possible, I felt that I needed more support from the IDE.

The Arduino IDE just wasn't up to it.

To create larger projects, learning better programming skills, and habits, become very important.

And learning PlatformIO, and using a fully integrated development environment for embedded systems programming, that takes advantage of modern tools, is the first step towards that goal.

What about you?

Why are you interested in learning PlatformIO?

Let us know in the comments below.

"ESP32 Unleashed" series

Ready for some serious learning?

Enrol to 

ESP32 Unleashed

A new learning adventure awaits you.

Create an application that will stretch your existing knowledge and skills.

ESP32 Unleashed is a project course

This course is perfect for people familiar with the ESP32, especially graduates of ESP32 For Busy People.

It is a guided project, designed to teach you how to use modern tools to create modern embedded applications based on the ESP32.

Just click on the big red button to learn more.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}