programming a slave Arduino from a master Arduino .

I’m sure this has been discussed somewhere but I can’t find it.

I would like to download sketches from an SD card on one Arduino and load them into a second Arduino. This would be under the control of the first Arduino not the IDE.

Has anyone done this?

You cannot "download" sketches from one Arduino for another. You can use an Arduino to program another one.

What exactly is the application? Maybe you don't really have to do this.


It's for a webserver. The Ethernet card doesn't have enough ram. I've got all this storage space on the SD card. If I could keep software there and shove it into a second 328 I should be able to offload a lot of the work to the second processor.

If you can burn a bootloader with an Arduino you should be able to push binary software images too.

Although swapping programs would be a bit slow the amount of software you could run would be huge.

What I really need is an interpreted language. You can do this kind of thing with Forth but I'm not about to try and get the various libraries to work with that.


Why not just use a larger Arduino?

If not you can connect A1 to A2's SPI and reset pins. You can then read a binary image from SD and program A2 with A1, much like the current Arduino ISP code does. (In fact you could probably just use that code).

A larger chip has to be an easier option although I can see a benefit to in-field loading of code, we used to do similar on comms processors, we'd load different code according to the protocol selected for a port.