I’m new at this and from what I understand I need to create a repository on the cloud to use libraries in my program for my photon. I was having the same problem as busterdavidson. I don’t understand how the reply addresses the question and don’t follow the explanation in getting started. How do I create a repository or is that actually what I need to do?
If you are just using the web IDE (build button on the website) to compile and flash your code, then you can also cut and paste your libraries in to be used in sketch. Just click the small grey “circle-plus” in the upper right-hand corner of the window. This will allow you to add a library as a .h and .cpp file to your web project.
If you are the author of a library and want to share it with the community, then you need a github repository to share it from.
If you are using Particle Dev or other tools, tell us and we can help you there too.
I attempted what I think you said, but I’m still having issues. The library I’m attempting to use is “OneWire”. So, what I should do is, go into the web IDE and click on the plus, locate the code in the Arduino library, and cut and paste it into the command file. Do I need to add anything to the header file? I ask because all I see is code that looks like a command file and no header file. I have a small amount of experience with header files from a C++ class I had a couple of years ago, but I don’t remember how to compose one.
You don’t need to even do that for the onewire library! There is an official Particle onewire library in the web IDE.
Find the icons on the lower left side and click on the one that looks like a little ribbon with a notch cut out of the bottom, second from the top in the bottom group. That will open the libraries tab and you can select the onewire library.
But this bound to change once Libraries v2.0 is released. Then you could just upload a library from your own harddrive directly (at least for private use - for public it would still be good to offer a GitHub repo to accept issue reports and PRs )