I've just discovered... PlatformIO

I'm sure many people will laugh at my subject-heading and think... "well you've taken long enough to discover this productive and exciting environment".

As many of you know, I've been experimenting with the nRF24L01 radios for my students' weather stations and during this exercise someone suggested I should look at PlatformIO as my development environment.

Here's a link to a Youtube video that steps you through installing and using PlatformIO.


As well as doing all the normal things like writing a "Hello World" and "LED blinker" sketch, I've also worked out how to do Over-The-Air (OTA) code updates and how to assign a fixed IP address to my Wemos devices.

Like most things in life, there is a learning curve involved in getting to grips with this tool, but I think you'll find the investment of your time is well worth it.

2 Likes

Can I ask what you've used up to now? I haven't tried PlatformIO myself, but as a long time user of Visual Studio I've found it pretty good for development, although the debugging features in the Visual Micro plugin are pretty limited.

I've also installed VSCode and the Arduino plugin, rather than PlatformIO, but not had a chance to really evaluate it yet, so any thoughts on the pros and cons would be of interest. Particularly any thoughts on the debugging capabilities.

Well I've been using ESPeasy and recently Arduino IDE for programming my Wemos devices.

VSCode with the PlatformIO plugin seems a natural fit and creates a very productive environment.
I've managed to eradicate many silly mistakes before going to the compile stage.
The colour-coding of blocks and definitions is very helpful.

I must admit I've only used PlatformIO for a couple of days, but have been really impressed with what it can do and how easy it is to use.

1 Like

Thanks for the info. Visual Studio and VSCode do provide a nice environment, especially things like Intellisense, highlighting, folding etc.

I'll have a look at PlatformIO when I get a bit of spare time,

There is ONLY one thing wrong with PlatformIO... it makes the hours and hours I spent refreshing my C, and learning to use the Arduino IDE to develop C code based firmware images for my ESP based projects... almost completely obsolete. Baaahhh Huuuummmbug! A POX upon PlatformIO! [Cough].

I tried it, maybe a year ago, on Ubuntu, but I found it tended to crash, particularly if a file it was looking at was changed by another app, and this messes up it's settings so it was difficult to get it going again.
Things may have improved since then.

1 Like

Well, it is next on my list... After I get all the NR stuff done I want to do. I am maybe half way through my list of stuff queued up. So I figure I will get to PlatformIO sometime next year, maybe March or April?

I've had very few issues with Linux Mint (Ubuntu based) and those have usually been related to major updates. I think you've just had bad luck. I've been using it now for 3 years I believe.

They've also got a support forum where you might find hints but it's unfortunately not in the same league in community support as this forum is.

As someone who's used to modern development tools, I would've never got into Arduino if I wouldn't have discovered PlatformIO. The only gripe I have with it is that they seem to have a tendency to (by default) automatically install new versions even with breaking chances. But for me regardless of the occasional troubleshooting (usually deleting hidden folders form a project dir is enough) it is an invaluable tool.

One of the less mentioned feature I really appreciate is the IDE agnostic nature of it. I for example happen to subscribe to a Jetbrains "all-products-pack" license due work. PIO also supports Jetbrains CLion which is a far more professional C/C++ IDE (and for me very natural to use as it follows the patterns as their Java/JS IDE which I use at work).