I have been googling this for a while, but can’t find any answers that seem to fit my situation. However I found something that looked promising regarding setting up a lib_extra_dirs option in platformio.ini. But this option is depricated and I don’t know what to do as an alternative.
I have a bunch of projects (each is a sensor in a home automation system) that are quite similar and each use a few common functions that I have written. Currently each project has its own copy of these common fuctions. Not a good idea!
How do I setup a library of these functions so that all projects can access them? My folder structure is as follows…
main folder
project A
.pio
.vscode
include
lib
src
test
.gitignore
platformio.ini
project B
project C
I’m happy to change the folder structure if it is not ideal. In any case, where should I put the common source code and how will the compiler find it?
Cheers