Photon project management

so I’m having a great time playing with the photon and getting projects to run. My question now is how do I copy a project so that I can save my work at a particular revision and then take that code and make it do something completely different (basically use what I have as a starting point for another project). I think this might be a Git question, but I’m not seeing how I get my projects from the particle Build web based IDE into Git, or manage them from inside the IDE… Any information/direction is greatly appreciated!

Thanks,
Eric

Sadly the Web IDE does not have version control right now…

Thanks for getting back to me. So the web IDE doesn’t have version control, but i also have not been able to find any ability to copy a project that you make yourself. I can find the “fork” a project for projects that are in the libraries, but my little test projects are not really worthy of going into a public library. I know I can always start a new project and then copy and paste the code in from the old project, but that seems a bit clunky and doesn’t get the included libraries…

I’ve started looking at github as well. is there any linking between the photon web IDE and github??? (he said optimistically…)

Thanks again!

Eric

Old thread, but I noticed the phrase "right now". Is there now a plan for this, or better yet something implemented? My internal company policy is that all code be under version control, specifically we use subversion for this, but I could be flexible.

I can't believe there isn't some means of having version control for a system so well thought out and aimed at professionals.

Thanks
Ken

Web IDE isn't really the first choice for pros IMO. They usually would rather go with a local toolchain or maybe CLI, I'd think.

However (sorry, people might be sick of hearing it) Particle is working on a complete rework of the IDEs for quite a while now, but isn't there yet. Given that, there isn't any major time going into adding features on Web IDE which should be superseded soon.

1 Like

I just copy my entire code and paste into a blank app. Not exactly what you’re looking for, but it works.

My suggestion for the IDE:

  1. Copy the top level folder containing your project at the revision you want to save.
  2. Paste the folder in a directory containing your project revisions with a new revision name for the directory.
  3. In the IDE, remove the existing project, then add the new revision directory in.
  4. You will then have a snapshot of the entire project and be able to begin modifications under a new revision.

Yes, I’m sure that this is much clunkier than Github, but it does the trick for free and you can keep your code private.

I strongly recommend NOT using the IDE for compile and upload. The IDE frequently seems to have issues compiling the current version of the .ino file. Don’t ask me why. Compiling at the command line yields reliable results.

I wrote python scripts to automate compilation/flash process which handle the issue of the long .bin file name so I’m not copying/pasting that all the time.

I’m not set on an editor yet, but I would highly recommend Sublime over Atom just for sheer speed. Where Atom does shine is the integrated serial port monitor. Atom has better contextual auto complete as well, but that’s not perfect in the Particle revision of Atom and not necessarily a compelling reason to stay in Atom.

One upshot of Atom: I’ve yet to find a more efficient/reliable serial port monitor on Windows than Atom’s, however. It’s not perfect, but the best I’ve tried thus far.

If we are talking about Web IDE, using the SHARE THIS REVISION button seems a lot more practical IMO.
If you just want to keep track of the revisions, just store the created link of that revision as comment in the top section of your main .ino - this way you will have access to all previous revisions even without actually copying them into your account.

Did you know of the --saveTo switch of CLI which allows you to specify the binary file name?
This builds the project stored at current directory (.) for Photon targeting Device OS 0.6.3 and saves the binary as pTest.bin

particle compile photon . --target 0.6.3 --saveTo pTest.bin

This is a simple batch I ususally use on Windows for building and flashing

mode COM3 14400
particle compile e . --saveTo e.bin
particle flash --usb e.bin
particle serial monitor --follow

You can add parameters, but this assumes your device at COM3 and puts it into DFU Mode, compiles, flashes and starts the serial monitor to "immediately" see the result of the new code.

2 Likes

Thanks for all the advice everyone. Just starting out, so have only tried WebIDE, not local. Sounds like local is a little buggy as well perhaps. I will try some of these ideas and see how it goes.

Ken

ScruffR,

Thank you for the tips on the command line switches. I will give those a whirl.