Common sample code, like the Arduino IDE?

I had been using the Arduino IDE thinking it was the only choice. It sucked, especially for the high-DPI support and the lack of code completion. Now that I have found Platform IO (VS Code), I feel like I was stupid. This is immensely better than the Arduino IDE.

The only thing I miss for the moment is the sample code feature. Does PlatformIO have a similar feature (getting commonly used code)?

PlatformIO does currently not do this with every availble Arduino IDE example. This was also discussed in Examples for Board which resulted in New feature request - Board specific examples code not available · Issue #12 · platformio/platformio-home · GitHub but seems like it wasn’t further being worked on, @ivankravets?

However, in PlatformIO you can scroll through every example of a platforms.

In the GUI you can go to the platforms and select one (e.g. Atmel AVR) and there will be an examples tab.

As you can see the select example here, which is currently arduino-blink. You can select others:

You can scroll through the platformio.ini and the code at the bottom. Pressing the “Import” button starts a new project with this example preloaded.

However, the PlatformIO platforms don’t contain the Arduino IDE examples 1:1 – just some own selection of examples. (see e.g. platform-atmelavr/examples at develop · platformio/platform-atmelavr · GitHub or platform-ststm32/examples at develop · platformio/platform-ststm32 · GitHub).


Yes, we depend on

There is no ETA for this case :frowning:

1 Like