How share include files?

I have a hardware PC board with a bunch of sensors. The Photon works with the board via standard digital pin reads and writes. Most of the interconnections between sensors and Photon pins are in an include file.

There is one main project composed of several C files plus the include file. This works great.

But I have several other small test programs used to check out cables, LED’s, and base functionality of the project, exclusively at the hardware level. These test programs either have all the sensor to pin definitions in the main body of their code or they are in their own include file. I am moving to get everything about the hardware definitions out of the C file and into the include file.

Sometimes I make a hardware change such as which sensor is connected to which Photon pin. Obviously I need to make the corresponding change to the include file. And that works.

The problem is, there is one include file for each test program and one for the main project set of files. I want to assure errors do not creep in and I want to minimize work, so I would like to have ONLY ONE include file. Change it in one place and everybody sees the change.

I only use the web IDE, build.particle, and I don’t have a clue what github is or how to use it. (I missed the training session, I guess.)

This is all compounded by the fact there are three of us on the project. Each of us develops and when we have something that works, we share it via email or google/drive. (Copy/paste, yuck.) I don’t know how to think about the problem to make such sharing easier. For now all I’d like is for my personal dev environment to be able to have one include file shared over many projects.
–jim

AFAIK, if you’re using the Web IDE, there is no easy answer to that besides Ctrl-C Ctrl-V. If you were building locally there are ways to deal with it, but I think you’re out of luck with the Web.

I will say that if you’re doing serious collaboration, a versioning web service like Github (or Bitbucket, which also uses Git and you can have a few private repos for free if you don’t want your code out available on the internet like Github does for free) would likely save you a lot of headaches in the long run if you’re willing to put the time in to figure it out. I will say that it does have a bit of a learning curve, but there are some softwares out there that help make it a little easier (I like Sourcetree on Windows, and SmartGit on Linux). Also, you can do this independent of a centralized source file, it’s basically a way of versioning and sharing a folder with your code (kinda like Dropbox, but intended and better for source files)

1 Like

For the time being, you could share the account?

1 Like