The instructions in the /lib/readme.txt are invalid

PlatformIO will find your libraries automatically, configure preprocessor’s include paths and build them. Not so much:

Compiling .pioenvs\megaatmega2560\src\src\feature\filwidth.cpp.o
Marlin\src\feature\digipot\digipot_mcp4018.cpp:30:78: fatal error: SlowSoftI2CMaster.h: No such file or directory


  • Looking for SlowSoftI2CMaster.h dependency? Check our library registry!
  • CLI > platformio lib search “header:SlowSoftI2CMaster.h”
  • Web > PlatformIO Registry

compilation terminated.
Compiling .pioenvs\megaatmega2560\src\src\feature\fwretract.cpp.o
*** [.pioenvs\megaatmega2560\src\src\feature\digipot\digipot_mcp4018.cpp.o] Error 1

Tree of my directory

──Marlin
│ Configuration.h
│ Configuration_adv.h
│ Makefile
│ Marlin.ino

├───lib
│ │ readme.txt
│ │
│ ├───SailfishLCD
│ │ │ SailfishLCD.cpp
│ │ │ SailfishLCD.h
│ │ │
│ │ └───examples
│ │ └───FlashForgeInterfaceBoardLCD
│ │ FlashForgeInterfaceBoardLCD.ino
│ │
│ └───SlowSoftI2CMaster
│ │ README.md
│ │
│ ├───examples
│ │ ├───BMA020Slow
│ │ │ BMA020Slow.ino
│ │ │
│ │ └───I2CScanSlow
│ │ I2CScanSlow.ino
│ │
│ └───src
│ SlowSoftI2CMaster.cpp
│ SlowSoftI2CMaster.h

└───src

OK fine screw it, I’ll just make a folder with the cpp and h in it. Whomp whomp:

Marlin\src\SlowSoftI2CMaster\SlowSoftI2CMaster.cpp:3:31: fatal error: SlowSoftI2CMaster.h: No such file or directory


  • Looking for SlowSoftI2CMaster.h dependency? Check our library registry!
  • CLI > platformio lib search “header:SlowSoftI2CMaster.h”
  • Web > PlatformIO Registry

compilation terminated.
Compiling .pioenvs\megaatmega2560\src\src\feature\I2CPositionEncoder.cpp.o
Compiling .pioenvs\megaatmega2560\src\src\feature\Max7219_Debug_LEDs.cpp.o
*** [.pioenvs\megaatmega2560\src\src\SlowSoftI2CMaster\SlowSoftI2CMaster.cpp.o] Error 1

The header and source file are in the same folder. This is my first time using platform IO and so far I am very unimpressed. I’ve wasted over an hour on the very simple task of including a cpp and header file…

https://imgur.com/a/UGRZEyH

Any suggestions that don’t involve messing with uploading to the curated library repo or making a json?

Well wouldn’t you know it, Visual Studio Code apparently is bugged. Par for the course for Microsoft these days. Sure made me look like an idiot here…

Please read Library Dependency Finder (LDF) — PlatformIO latest documentation