Go Down

Topic: Managing Sketches and Libraries with Multiple Computers (Read 1 time) previous topic - next topic

terryking228

Jan 20, 2013, 07:36 pm Last Edit: Jan 20, 2013, 07:39 pm by terryking228 Reason: 1
Hi, I'm asking this here because You Da Guys.. who are doing lots of development and answering complex questions.

I use many different Libraries you and others write. I also write a lot of sketches.   I have a 'main computer' that I'm typing on and where I do most original sketches with some desktop Arduino stuff.  But I am doing Home Automation stuff and have a machine in the living room near an Arduino setup that's supposed to be up 24/7 . Then I have a machine on the electronics bench where sometimes I'm testing stuff, using the scope etc. Two WIN7 and one XP.

I got outta control again today, with backlevel libraries etc etc.  I just zipped and merged all libraries and most Sketches.  I really don't want to do that every day/week.

What do you do to manage this?   There must be some elegant and possibly simple way of doing this that I haven't thought of!

I bet some of you got this figgered out  :)

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

PaulS

Quote
I bet some of you got this figgered out

Networking and mapped network drives. Are your computers all on the same network?

terryking228

Hi Paul, Yes same network here...  How would you map all the stuff? How would the machines 'know' where stuff is?
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

robtillaart

use a NAS for your Arduino folder ?  // NAS == network attached storage
also useful for your PDF's datasheets etc.

The SYNOLOGY DS-212J  is a nice piece of metal ;)   but there are more bigger and smaller,
Make sure to use at least  RAID 0 (2 disks)




Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

PaulS

If you have three computers, MC, HA, and AO, then one of them (say MC) has the Arduino software and libraries on the C drive. On HA and AO, map the C drive on MC as the D drive (or whatever letter you like). On HA and AO, the Arduino software and sketches will be on the (mapped/mounted) D drive, rather than actually being installed/saved on the actual computer.

terryking228

#5
Jan 20, 2013, 07:51 pm Last Edit: Jan 20, 2013, 07:53 pm by terryking228 Reason: 1
Thanks, Paul!  So the MC (Master) machine is like a server for the others.. right?

How do I get the other IDE's to know where the libraries are??

Rob, I do plan to get a NAS or Server machine Real Soon Now... 
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

djjoshuad

I use Subversion for this purpose.  Super easy to set up and use on any modern non-windows OS.  Also possible on windows but you'll need something like TortoiseSVN.

For example, I have a linux firewall, linux media server, linux on two RasPis, OSX on two MBPs and an imac.  One SVN (Subversion) repository on one of the linux servers that holds all my code in a version controlled manner.  I can push updates or check out revisions from any of the linux or OSX instances with a quick one-line command.  

It might be a foreign concept right now but the learning curve is *very* small and once you start using it you'll wonder how you ever used multiple machines (and/or developers) to work on one project without it.  Other options are CVS and git that basically do the same thing.  CVS is antiquated and git is probably overkill, although the architecture of git is pretty cool and if yo uwant to stick your stuff on github, it's free and easy to use.  You can also keep it private and local though if you want.

robtillaart

Quote
How do I get the other IDE's to know where the libraries are??

you must define the Arduino folder in such a way that they all are the same < ideally>

On the PC with the phyical Arduino on board use 

subst x: c:\users\terry\             < should be in autoexec or so>
subst y: c:\programfiles\           

On the other PC's mount
c:\users\terry as the x: drive.
c:\program files\ as y: drive.

Then everywhere you can use the x:\ and y:\   in the path of Arduino and/or program files.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

tack

How about something like Google Drive? Won't that keep folders in sync via a master copy on the net?

Imagine, you update and save Sketch 1 on PC1. Google Drive re-syncs teh changed file. PC2 sees updated file on Google Drive and re-syncs back down. Result = PC1 and PC2 in sync.

Would this work in that context?

The bonus would be a cloud based back up of all your files.

djjoshuad


How about something like Google Drive? Won't that keep folders in sync via a master copy on the net?

Imagine, you update and save Sketch 1 on PC1. Google Drive re-syncs teh changed file. PC2 sees updated file on Google Drive and re-syncs back down. Result = PC1 and PC2 in sync.

Would this work in that context?

The bonus would be a cloud based back up of all your files.

This is the same as using svn or git, but without all the version control :)

terryking228

Hi and thanks for ideas!

Google Drive or Dropbox are possibilities. Version control probably isn't an issue with one person coding, or my wife coding totally different stuff. Usually.

Dropbox at least keeps a physical copy on all machines, so things work fine if the net is down/slow. 

Where/how do I tell the IDE that stuff is not In The Usual Place??

Rob, in my 'standard' installation terry/arduino  contains terry/arduino/libraries so I THINK I only have to tell IDE where the /arduino root is??
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

djjoshuad

at the risk of sounding defensive of my suggestion, I will offer one more piece of advice:

version control is more useful than you might think.  Being able to go back and easily see what you changed between a version that worked a week ago and one that is broken today but is 5 revisions removed... super useful.  Also, the version control mechanisms allow you to maintain versions of other peoples' code.  I thought that might be useful to you since you mentioned that you're using "backlevel libraries". 

Last but certainly not least, the control mechanisms I mentioned excel at maintaining code in multiple locations, not just in multiple versions.  On windows, a simple right click->update on the folder you need to update (like My Documents\Ardiuino) will retrieve the latest revision from the server.  Similarly, if you want to use an older revision, the process is maybe one step longer.

Using mapped network drives or google drive or any shared-location-without-version control is not only inelegant but runs the risk of fubar'ing the whole code repository.  Using a version control system gets you all the benefits and simplicity of the other systems but *with* the added protection and organization of version control.  I'll stop trying to convince you now... but I hope you give it a try.  you will not be disappointed :)

tack


Hi and thanks for ideas!

Google Drive or Dropbox are possibilities. Version control probably isn't an issue with one person coding, or my wife coding totally different stuff. Usually.

Dropbox at least keeps a physical copy on all machines, so things work fine if the net is down/slow. 

Where/how do I tell the IDE that stuff is not In The Usual Place??

Rob, in my 'standard' installation terry/arduino  contains terry/arduino/libraries so I THINK I only have to tell IDE where the /arduino root is??

Google Drive also keeps things physically on your machines, just like DropBox.

To change Sketchbook location, go to File > Preferences from within IDE.

Versioning sounds like a good idea. I may well look into Subversion and SVN to see if it can be run on Windows.

terryking228

Hi, OK the Google Drive/Dropbox approach seems simplest, and OK unless versioning is needed.

Actually, since I have been known to break code that worked, versioning might actually Be Nice...

Quote
To change Sketchbook location, go to File > Preferences from within IDE.


"I Knew That!".. Not.  I suppose I should crawl through the menus of all the applications I use and find more good stuff that I didn't know about. Hmmm....

OK, I'll implement one of these..  and Thanks for the help!
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

PeterH

If you want to have versioning but don't want to do versioning yourself, then I recommend you take a look at File Hampster. FH is configured with the files/directories to be monitored; each time a monitored file is updated FH will preserve a copy of the previous version. It has configuration options to define how long old versions are kept for, to roll up multiple updates that occurred close together, let you save or discard or preserve individual updates, and so on. It doesn't give you all the capabilities of a fully-fledged change control system, but gets you a good way there at zero effort.
I only provide help via the forum - please do not contact me for private consultancy.

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview