# I've just discovered... PlatformIO

**URL:** <https://discourse.nodered.org/t/ive-just-discovered-platformio/33579>\
**Category:** Share Your Projects\
**Created:** [30 September 2020 16:20 UTC](https://discourse.nodered.org/t/ive-just-discovered-platformio/33579 "2020-09-30T16:20:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [30 September 2020 16:20 UTC](https://discourse.nodered.org/t/ive-just-discovered-platformio/33579/1 "2020-09-30T16:20:21Z")

</div>

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.

> [@Using nRF24L01 radios as part of a weather station](https://discourse.nodered.org/t/using-nrf24l01-radios-as-part-of-a-weather-station/32758):
>
> This is an extension of the weather station project one of my IoT students tackled last year (2019). The objective was to have a remote sensor (located in one of the school's gardens) to send temp/humidity/pressure readings to a database using MQTT. Initially a Wemos D1 Mini was used but the WiFi range of the ESP8266 limited the distance the sensor could be placed from the school. Someone suggested I should look at the inexpensive UHF radios - - nRF24L01 as an alternative. I've just spent a …

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

[![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/4/34870e6c125c4169e098432fdd8990ef0d075753.jpeg "How to Program Arduino in VSCode (Using Platform.io)") ](https://www.youtube.com/watch?v=dany7ae_0ks)

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.

---

<div class="post-metadata">

**Author:** ![molesworth](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/molesworth/32/11748_2.png) [@molesworth](https://discourse.nodered.org/u/molesworth)\
**Post date:** [30 September 2020 17:21 UTC](https://discourse.nodered.org/t/ive-just-discovered-platformio/33579/2 "2020-09-30T17:21:40Z")

</div>

> [@dynamicdave](#):
>
> 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".

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.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [30 September 2020 17:39 UTC](https://discourse.nodered.org/t/ive-just-discovered-platformio/33579/3 "2020-09-30T17:39:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![molesworth](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/molesworth/32/11748_2.png) [@molesworth](https://discourse.nodered.org/u/molesworth)\
**Post date:** [30 September 2020 19:00 UTC](https://discourse.nodered.org/t/ive-just-discovered-platformio/33579/4 "2020-09-30T19:00:38Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [30 September 2020 20:37 UTC](https://discourse.nodered.org/t/ive-just-discovered-platformio/33579/5 "2020-09-30T20:37:19Z")

</div>

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].

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 September 2020 20:54 UTC](https://discourse.nodered.org/t/ive-just-discovered-platformio/33579/6 "2020-09-30T20:54:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [30 September 2020 21:24 UTC](https://discourse.nodered.org/t/ive-just-discovered-platformio/33579/7 "2020-09-30T21:24:31Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [30 September 2020 21:24 UTC](https://discourse.nodered.org/t/ive-just-discovered-platformio/33579/8 "2020-09-30T21:24:37Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [29 November 2020 16:20 UTC](https://discourse.nodered.org/t/ive-just-discovered-platformio/33579/9 "2020-11-29T16:20:23Z")

</div>

This topic was automatically closed after 60 days. New replies are no longer allowed.
