Writing Arduino libraries with PlatformIO

Good-day, everyone!

Does anyone have a link to documentation on writing Arduino Uno libraries with PlatformIO?

Thanx in advance!

I don't use PlatformIO. But, I don't see how it would be any different than writing libraries in any other development environment, at least conceptually. It's just code. You implement the library functionality in .cpp / .h files. Moving those files to the appropriate place in the directory structure so they can be referenced by Arduino sketches is what makes it a "library".

PlatformIO is compatible with Arduino libraries, so the documentation for writing an Arduino library is all you really need.

Here is the Arduino Library Specification:


Here is an introductory tutorial:


PlatformIO does also support other library formats, but these are not Arduino compatible. So if your goal is to write an Arduino library then you should not use those formats. If it is not compliant with the Arduino Library Specification, then it's not an Arduino library.

1 Like

Thank you for the info concerning PlatformIO’s compatibility with Arduino’s libraries and for the links!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.