Multiple Arduino Programming

Hi all,

I Know this topic has been discussed in past. I even searched lot in internet but couldn't find appropriate answer.

I have 4 arduino's and the quantity will gradually increase, is there a way I can program them all at once with same code ?
(Assume all are connected to same network/wifi/internet)

Thanks in advance,

Regards,
Swaroop

swaroop2011:
(Assume all are connected to same network/wifi/internet)

Doesn't each of them have to be connected to the USB connection for uploading code? Or to another Arduino acting as a programmer.

I doubt if there is a simple answer for what you want. The upload process is a two-way conversation between the programmer and the Arduino so you can't connect several in parallel to a single programmer.

...R

If you plug in multiple Arduinos in to USB, you should get multiple comm ports on your computer. Since the programming functionality of the Arduino IDE can boil down to command line calls, there should be a way to batch/script the calls to program multiple devices; each just based on a different comm port.

A lot of this would be dependent on the types of devices you are using and how they are hooked together. Please describe your overall scenario, because you talk about "network/wifi/internet", and Arduinos are normally not programmed that way.

Basically the Arduino that needs programming needs to exchange data with the thing programming it. So each one needs a separate port, you can not just parallel them up.

Thank you Robin, Michael and Grumpy_Mike.

I guess there is no other way then programming one at a time. But it will be hectic process if there are 100's of them. Say i have 10 locations and each has one arduino, then programming each one by one is definitely a hectic process.

@michael --> You can definitely program arduino using Wifi (Simplest example is newest Arduino Yun).

I think you misread/misunderstood my post. You should read it again.

If you're doing hundreds, you may be able to get your supplier to program them with your code for you.
If you're buying custom boards, you can have the chips programmed before they are installed on the boards.

If the boards are already bootloaded:
One forum member reported connecting multiple Unos in parallel and serially downloading them, with only one TX going back to the PC.

Sorry about Micahel.
Thanks CrossRoads will definitely try out these things and will update here if there is success.

@CrossRoads
what you are saying is correct to get supplier load program into all of them.

But then question arise what if I need to modify the program, so now again I need to do manually each and every arduino right ?.
Haven't tried out writing a batch script file to upload program to one arduino at a time, but will try out soon and then update back here.

I'm not seeing an easy way to update them all automatically.

But you could ease the process with a batch file to call AVRdude - or you could carry around an Arduino running a sketch that flashes a hex file (there are a few, I'm pretty sure Nick Gammon made one)

It's called parallel programing. Google "parallel programing atmel avr"

Mark

holmes4:
It's called parallel programing. Google "parallel programing atmel avr"

Mark

Parallel programming uses a parallel interface. What he wants to do is use the serial interface (USB) to program several Arduinos at once. Not the same thing at all.

CrossRoads:
If the boards are already bootloaded:
One forum member reported connecting multiple Unos in parallel and serially downloading them, with only one TX going back to the PC.

Would that be all the TXs connected into one, or the TX from just one of the multiple Arduinos?
I would assume the latter, but it's not clear from your post.

All Rxs connected together, just one Tx from one device going back to the PC.

Parallel programming uses a parallel interface. What he wants to do is use the serial interface (USB) to program several Arduinos at once. Not the same thing at all.

Re-read the op's post! I saw no serial requirement and even if the op had implied one he would have been worng as where you for saying it's a no go!

Mark

All the resets connected together, and grounds connected together, and RX's connected together. The TX from the one Arduino connected via the USB cable will be the signal going back to the computer for the flash verify and handshaking. All the Arduinos should be the same AVR, clock speed, and same bootloader version (if you want a sure bet).

I guess I was looking for an experiment. I programmed an Uno and 2 Pro Minis at the same time with the same sketch. The Uno was the main board I was programming. The 2 Pro Minis were the secondary Arduinos connected with just RX, GND, Reset, and 5V and they accepted the sketch at the same time. Before starting I burned all the Arduinos with the Uno Optiboot bootloader.

I was not able to add a secondary Nano. I believe the secondary Arduinos cannot have an onboard CH340G or other FTDI-like chip hooked up to the RX and DTR-cap-Reset. It may be possible to drive the RX and Reset lines of the secondary Arduinos with transistors if they have FTDI on board or add some pull up or pull down resistor trickery. I did not try that.

I was able to add a secondary Uno after I erased its ATmega16U2 and added a 15K pull down resistor on the Reset line for reasons discussed here, DrAzzy comments about DTR caps fighting each other: External reset circuit needs voltage divider while on-board reset does not, why? - General Electronics - Arduino Forum
I probably could have just cut the reset-en trace on the secondary Uno instead of adding the pull down resistor. In the end I programmed 2 Unos and 2 Pro Minis at the same time reliably.

(edit -- and yes this was not the OP requirement of programming over the net, but I was curious about the simultaneous programming via serial which was brought up later in the discussion, sorry)