Go Down

Topic: [Solved] Easy way to simultaneously deploy a sketch to multiple devices? (Read 3058 times) previous topic - next topic

So I am working on a 2.4GHz RF project, which requires the same code on two or more nodes at once.  As it is, I compile it, and upload to one, then select the serial port for each node, and upload each one.  It'd be great to have something (even on the command line), to just say, "Send this to <all of these> ports."  Any ideas?

Coding Badly

Hold the Shift key and click Upload.  The AVRDUDE command-line is output to the status window.  Drag the mouse to select the command-line and press Ctrl+C.  Start your favorite text editor.  Paste.  Alter the command-line as you wish.  Select the command-line and copy.  Open a command-shell.  Paste.  Repeat for the other nodes.

Ah, thank you.  That's quite handy.  Ok, so that leads me to my next question.  Sketches seem to get built in a different temp directory every time. Is there a handy way to overcome that?  I'm comfortable with build toolchains in general, but I've not cracked open the Arduino tools one bit.


Is there a handy way to overcome that?

Not within the IDE AFIAK.

Start using an external editor and makefile. Then you could either knock up a batch file to include the commands that CB detailed, or include a target for all the boards in the makefile.


Rob Gray aka the GRAYnomad www.robgray.com

Yah, guess it's time to buckle down and figure out the Arduino toolchain.  So far I've been really happy with the experience out of the box, content to just focus on the code.


If you decide to do that I have a makefile you can use.

Rob Gray aka the GRAYnomad www.robgray.com

If you decide to do that I have a makefile you can use.

Yeah, that would be great.  Do you have it posted somewhere?


Attached is my latest version, probably not industrial strength and still needs some cleaning up but it's been working on my system for some time.


Rob Gray aka the GRAYnomad www.robgray.com

Success!  Ok, I used that make file and successfully uploaded.  w00t!

Had to tweak a few things to work on Mac OS, but not much.  And a couple tweaks to do the multiple uploads.

I think there is one bug...  This line...

Code: [Select]


...should probably be using $(CXXINCS) not $(CINCS).  Otherwise, remove $(CXXINCS) up above cuz it doesn't seem to be used anywhere else.

Anyway, this is glorious!  Thanks for the help!! 

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131