PlatformIO Community

Some questions about using PlatformIO for arduino

Hi, PlatformIO is great and easy to use, but I’m puzzled with the following questions:

  1. There are some examples in my arduino installion path, as the picture illustruated:
    1
    Are there similar examples in arduino-framwork of PlatformIO?

  2. There are some libraries in my arduino installion path, as the picture illustruated:
    2
    And I also find that there are some libraries which installed by PlatformIO, as the picture illustrated:


    Does the libraries arduino used agree with PlatformIO used? I’m puzzled with it, because only .h file exists in the library PlatformIO used, where is the .cpp file? For example:
    4

  3. If I want to add an arduino library to PlatformIO, is there some step by step tutorials?(youtube has been blocked in my country)

Can you help me?
Best regards.

This is a header-only library, which is perfectly valid C++. Doesn’t need to be implemented in a .cpp file. See the official core implementation: https://github.com/arduino/ArduinoCore-avr/tree/master/libraries/EEPROM/src

RIP

PIO can use Arduino libraries just fine, just put the arduino library folder into the lib/ folder of your project, or use the global library storage https://platformio.org/lib and include them via the LDF (library dependency finder) directives, see documentation.

1 Like

Hi, maxgerhardt,
Thank you for giving me the detailed instructions.