PlatformIO Community

embeddedartistry/LibPrintf broken!

I attempted to use the library at PlatformIO Registry to play with printf() in an Arduino sketch, but it seems that there’s a directory missing. The directory is named “extras” and the LibPrintf.h file attempts to #include ../extras/printf/printf.h and fails straight away.

The library that’s installable on the Arduino IDE does have this directory, and can be happily used. But, I’m using PlatformIO. I’ve got around the problem by copying the “extras” directory from the Arduino library, and pasting it into .pio/libdeps/uno/LibPrintf after which, compiling a project works fine.

Obviously, this is needed for any project using this library.

Just a heads up, I’ll raise I’ve raised an issue with the author on GitHub. https://github.com/embeddedartistry/arduino-printf/issues/37

Cheers,
Norm.

Replying to myself! :grin:

The problem appears to be that when uploading to the registry, PlatformIO doesn’t pick up the extras directory. The workaround given is to use the library directly from github:

lib_deps = 
	LibPrintf=https://github.com/embeddedartistry/arduino-printf/archive/1.2.11.tar.gz

Note: The version listed by the dependency graph will be 1.2.10 for some reason!

The author of the library is looking into a manner of getting around this extras problem specifically for PlatformIO.

Cheers,
Norm.

Thanks for reporting this issue. There is no problem with PlatformIO, see my comment

Hi @ivankravets,

Thanks very much. It looks like we have a solution.

Cheers,
Norm.