From experience, PlatformIO incoroporates a logic that searches for the first valid library package nested in the repository. This is because a few people put the actual library folder in a subfolder in the repo and that is then supposted to be picked up (instead of the top-level folder). The search logic here seems to be to find the first folder that has an actual metafile (library.json
, library.properties
) or code file .cpp
in it. And the result of that in this repo is that the first folder of the first subfolder fullfills this condition.
Still, you can include it as follows, by:
- downloading the full repo once and placing it in
lib/
- add the necessary library.json file in a fork and reference that in lib_deps
- I have done so at https://github.com/maxgerhardt/tinyfsm.
Note: Care must be taken when using C++ standard library stuff. The example heavily uses std::cin
and std::cout
for input / output. This makes the size explode on embedded targets. When compiling for an STM32 for example, using std::cin
adds ~150 KBytes of flash memory usage (most boards have like 64 to 256 KByte). When that is removed and the pure Serial
object from Arduino is used, the size of the entire firmware shrinks to 12 Kbyte.
There’s a full example at: GitHub - maxgerhardt/tinyfsm-arduino-example: Example project for tinyfsm library without a lot of C++ standard dependencies