Is it Possible?

Hello i have a long far fetch Question. Is it Possible to program one arduino from another arduino? What i mean is there a way say in a external eeprom chip or fram and even a sd card to hold a sketch and with one push of a button it can transfer that sketch to another arduino and program it. Not sure if this is a topic going anywhere but I'm just curious Thank you.

Yes, it is actually quite easy to do. I've even programmed one Arduino to actually copy it's own running FLASH image to another identical Arduino over the serial port. Works great.

Do some Googling, and you'll find several programs out there for doing it.

Regards,
Ray L.

Yep it's been done and documented often. As Ray has said, you just need to google. I've even seen examples where several sketches are held in progmem and then allow the user a choice of which one to upload. So you don't even need an sd card. (the mega2560 has plenty of space for this if you're just programming some of the smaller chips)

Hello thank you. What i would like to do is copy from one Due to another. Or from one Mega to another. I'm searching stuff now just wanted to figure out what I'm looking for when i search for. i guess Flash cloning? or Flash image from one arduino to another?

The Due uses a completely different programming algorithm than the AVR-based Arduinos, so requires a completely different program. Its still perfectly do-able. The thing I found originally was called ArduinoVirus. If you Google that you should find it eventually. You can also download the spec for the programming interface, IIRC call STK500, from the Atmel website. The SAM chip data sheet documents the programming interface for the Due.

Regards,
Ray L.

Well the Due is one of them i would like to do i just want to get to the Basic of it uno board to uno or mega to uno Either one will do. i have 2 of each boards. but some reason i can't find my mega boards i only have 2 uno boards and 2 due boards i just moved to a new place a week ago.

Thank you RayLivingston and Ken i will keep searching and finding.

I did mange to find a youtube video on Self Replicating arduino sketch. Self-replicating Arduino Sketch - YouTube

Thank you it looks like this is what I'm searching for thank you again.

Hello i got a question with this Self Replicating arduino sketch would it also copy the libraries as well if they have them on the master board?

josephchrzempiec:
Hello i got a question with this Self Replicating arduino sketch would it also copy the libraries as well if they have them on the master board?

Once the code has compiled there are NO libraries. It's just a complete sketch that incorporates every function you have in your code AND any library functions you've used.

Thank you Ken

I will try to attempt this tomorrow thank you and see if i can get the Basic blink sample it came with. i see there is 2 parts a BlinkSync and a Blinkvirus. both have the same blink.ino in it what's the difference?

Hello I still can not figure out what is the difference between the BlinkSync and a Blinkvirus it looks the same in coding do i need to change both to the coding i made or just one of them needs to be change?

The sketches are in complete.

Try this also

Hi i am struggling with same issue

i found a video which title is "self replicating arduino sketch".

when i am verifing the blink virus or copier sketch , i am getting some error .

i have been implementing these codes to uno and due .

the video: Self-replicating Arduino Sketch - YouTube

the error:Arduino: 1.5.8 (Windows 7), Board: "Arduino Uno"

copier.ino:203:3: error: #endif without #if
copier.ino:216:2: error: stray '' in program
sketch_apr20a.ino: In function 'void loop()':
sketch_apr20a.ino:49:25: error: 'BYTE' was not declared in this scope
copier.ino: In function 'int copier()':
copier.ino:68:25: error: 'BYTE' was not declared in this scope
copier.ino:84:23: error: 'BYTE' was not declared in this scope
copier.ino: At global scope:
copier.ino:210:1: error: 'Status' does not name a type
Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

copier.ino:216:2: error: stray '' in program

You copied the code from a Web page and it has some Unicode characters in it that the compiler can' deal with

sketch_apr20a.ino:49:25: error: 'BYTE' was not declared in this scope

The program is old and was written for a pre 1.0.0 version of the IDE.

Serial.print(something, BYTE);

has been replaced by

Serial.write(something);

in later versions of the IDE