Pages: [1] 2   Go Down
Author Topic: Managing Sketches and Libraries with Multiple Computers  (Read 1426 times)
0 Members and 1 Guest are viewing this topic.
Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1925
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley

 
« Last Edit: January 20, 2013, 01:39:16 pm by terryking228 » Logged

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

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 617
Posts: 49463
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I bet some of you got this figgered out
Networking and mapped network drives. Are your computers all on the same network?
Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1925
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Paul, Yes same network here...  How would you map all the stuff? How would the machines 'know' where stuff is?
Logged

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

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13742
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-wink   but there are more bigger and smaller,
Make sure to use at least  RAID 0 (2 disks)




Logged

Rob Tillaart

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

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 617
Posts: 49463
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1925
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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... 
« Last Edit: January 20, 2013, 01:53:46 pm by terryking228 » Logged

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

Corinth, TX
Offline Offline
Jr. Member
**
Karma: 1
Posts: 92
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13742
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Rob Tillaart

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

UK
Offline Offline
God Member
*****
Karma: 17
Posts: 568
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Corinth, TX
Offline Offline
Jr. Member
**
Karma: 1
Posts: 92
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley
Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1925
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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??
Logged

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

Corinth, TX
Offline Offline
Jr. Member
**
Karma: 1
Posts: 92
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley
Logged

UK
Offline Offline
God Member
*****
Karma: 17
Posts: 568
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1925
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

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

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pages: [1] 2   Go Up
Jump to: