A way to access Library examples?

Hey I am moving to PIO from Arduino as it is so amazing.

In Arduino, you can directly check the examples and flash them for the libraries.
Is there a workflow in PIO that makes that possible? At the moment I tend to copy from the library manager and paste it in my code. But then there are a few things you have to do.

Is there a way to do it directly, like you click on the example and an editable window pane opens and then you can flash it?

Thanks and Happy New Year :slight_smile:

1 Like

Buts it’s already there in the main PIO Home screen? Or is it not what you mean?

I think the OP means the library examples… i.e. PlatformIO Registry … which can be found via the libraries section of PIO Home, and doesn’t have any nice simple way to running them like there is in the Arduino IDE (that nice File → Examples menu).

2 Likes

Yes. Exactly as @pfeerick understood me.

2 Likes

Is it also possible to view the examples via the CLI?

Also curious about this as I have a library (Portenta Pro Community Solutions) that is only examples of the new PortentaH7 board and as far as I can tell, I can’t access those examples in any meaningful way on Platformio. The library is an easy install with the Arduino IDE. Does anyone have any suggestions?

Since the library is missing the examples declaration in its library.json, PlatformIO can’t display anything. Also, their examples folder structure is non-standard with a 2-level nesting.

grafik

1 Like

Maybe the library registry can be improved to autodetect the examples of a library better in these cases? CC @ivankravets

1 Like

You have broken manifest. See PR

2 Likes

Thanks @ivankravets for the PR.

LOL, I said PR, but thought to myself ISSUE, so I never even considered that you had fixed everything for me. I just followed the link and got confused. All good now.

I am going to look for some example working library.json files since DOC’s just stress me out.

By the way, my schools maintenance department installed the arduino IDE incorrectly, (can’t update boards that need admin), Platformio saved the day, students installed VScode and were programming in minutes.

I may have to start making platformIO teaching videos.

P.S. I teach using the really expensive Arduino PortentaH7 which works great but I also teach the really cheap Seeedstudio XIAO which is not on Platformio. Is that something that would be easy to get working?

Hi @hpssjellis,

Glad to provide a superior developer experience for your students.

  1. “expensive Arduino PortentaH7”, yes, why do you use this board? We are software/hardware agnostic but this board is crazy expensive and is not intended for STEM/students.
  2. " cheap Seeedstudio XIAO which is not on Platformio", what are your course’s requirements? Have you looked at Espressif boards? They have good price and IoT functionality.

It’s there at Seeeduino XIAO — PlatformIO latest documentation

2 Likes

LOL, Could not find the XIAO board a week ago, now it is easy to find. Thanks @maxgerhardt

My course is good to go at

I have worked on the PortentaH7 for a year now designing the course and really kind of like it.

I have tried the Espressif boards and things work well but I can’t seem to do anything creative with them, the multiple number of boards and forums seem to throw me off. Yes from a price point of view they are great, but I can easily do Vision, Sound and Motion Machine Learning with EdgeImpulse and the Portenta with the LoRa Vision (and microphone) shield and the MKRIMU for acceleration.