Library Manager - Arduino - Community Libraries

Newbie. I’m trying to write some code using the Arduino ShiftDisplay community library (on mega2560). Maybe I’m missing it, but I don’t see it (or a parent?) in the PlatformIO registry though it is included in the Arduino standard distribution. Thus #include <ShiftDisplay.h> fails in cpp.

Do I need to do something to explicitly include it as it is a community library? Am I just missing it in the registry?

Any pointers appreciated.
Thx,
–Don

See documentation regarding lib_deps option in the platformio.ini. The library page already tells you how to include the library with

lib_deps = 
   miguelpynto/ShiftDisplay @ ^3.6.1

What @maxgerhardt said above++! :wink:

If you know the name of the library, you can do as suggested and add its name to lib_deps. If you don’t, but you know the header file name – as in this case – then:

In the results, for the above search, I see one result; ShiftDisplay by MiguelPynto.

  • Click the name of the library to open its page.
  • You will see, on the “Installation” tab, some installation instrutcions. In this case it recommends:
lib_deps =
 # RECOMMENDED
 # Accept new functionality in a backwards compatible manner and patches
 miguelpynto/ShiftDisplay @ ^3.6.1

 # Accept only backwards compatible bug fixes
 # (any version with the same major and minor versions, and an equal or greater patch version)
 miguelpynto/ShiftDisplay @ ~3.6.1

# The exact version
 miguelpynto/ShiftDisplay @ 3.6.1

And as @maxgerhardt says above, you simply have to add the chosen option to your lib_deps. Oh by the way, the 4 spaces (or a single TAB) at the start of each line is mandatory. Ask me how I know! :grin:

HTH

Cheers,
Norm.

Thanks much, I did the search earlier and guess I missed it. I will say that the lib mgt is well done!
–Don

It is indeed – once you get your head around it. :wink:

Cheers,
Norm.