Arduino sketch that can program other boards

Here is an Arduino sketch I’ve developed that is able to “copy itself” to other boards it is connected to via serial.

The code can now be found at:
http://github.com/George1024/Arduino-Copier

After you’ve finished watching this video, take a look at the updated self-replicating version of the sketch: http://www.youtube.com/watch?v=VSCxIg77K6E

It is an implementation of the STK500 protocol within an Arduino sketch. STK500 is used by avrdude and the Arduino IDE to write sketches to AVR chips.

A normal sketch (‘BlinkSync’ is used in the video) is first compiled and then converted from the Intel Hex format to a series of bytes written in C (by a Python script), which can be inserted into the Copier sketch as the data to be written to the destination Arduinos.
Afterwards, the Copier sketch and the BlinkSync sketch are stuck together, resulting in a sketch that performs both the original task and the copying of that task to other boards.

Duration : 0:4:30



Posted

in

by

Comments

8 responses to “Arduino sketch that can program other boards”

  1. mharizanov Avatar
    mharizanov

    hehe sounds like a …
    hehe sounds like a virus 🙂

  2. axel1973w Avatar
    axel1973w

    What about an …
    What about an Arduino that can programm an “naked” Atmel controller without any bootloader yet??

  3. sxdemon Avatar
    sxdemon

    We can accomplish …
    We can accomplish many awesome things with that.

  4. jerzmacow Avatar
    jerzmacow

    omg….its like the …
    omg….its like the replicators from stargate…

  5. oskay Avatar
    oskay

    Thanks!
    Thanks!

  6. CyberGEORGE1024 Avatar
    CyberGEORGE1024

    If Board 1 is the …
    If Board 1 is the programmer and Board 2 is the ‘programee’, then they are wired up as follows:

    Board 1 RX -> Board 2 TX
    Board 1 TX -> Board 2 RX
    Board 1 5V -> Board 2 5V
    Board 1 GND -> Board 2 GND
    Board 1 D7 -> Board 2 Reset

    (D7 is Digital Pin 7)

  7. oskay Avatar
    oskay

    Do you have a …
    Do you have a diagram or list for the physical connections between the two boards?

  8. CollinMel Avatar
    CollinMel

    very cool – please …
    very cool – please post code!

Leave a Reply