I had 1 Photon - super fun - it’s recording temperatures, tracking the gerbil wheel speed, restarting the Ring doorbell via IFTTT and an IOT plug when it goes offline…the whole point was to monitor for water in the basement and I got very sidetracked.
I use the Particle Workbench. I have the code in a Github repository. (I’m a developer by day - we use TFS at the office so Git is pretty new for me).
I finally got a second Photon. So now I need to organize the code better I think.
Should I have a repository for each device since they’ll do different things?
And now to share the code between the devices I’m assuming I’ll make a library…in its own repository?
While I’m developing the library how do I include it in my project so I can test/reference it?
Say I have a function RecordTempToGoogleSheet(…)
I’ll want to call that from both devices. I create a new repository for a library, make a library with the cli (particle library create), add the files to the repository.
Then go to a project for one of the Photons and… how do I link that library in under /lib/ since I’m assuming they’ll be in different repositories (and also assuming they’ll be in separate folders on disk…)?
There must be a convenient way to do local development on a library w/o having to upload the library to as a private library and then re-get it to get changes… maybe a config setting telling the compiler where to find libraries on disk instead of just in …/lib/ ?
Thanks in advance - Peter
This was a great help: