Arduino

George wrote up an Arduino sketch that can detect and program other Arduinos connected through serial. He demonstrates the functionality above by writing a sort of serial-synchronized version of the well-known “Blink” sketch –

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.

Quite cool – reminds me a bit of the Illuminato X Machina project demo. Now we just need to get Arduino writing it’s own code ;-]

12 thoughts on “Arduino sketch programs its peers

  1. Nice work. Have a look at LumiNet: http://www.luminet.cc

    LumiNet has a “Vector node” that infects the LumiNet network. Each node can infect its four direct neighbors. Each node can also be infected by each one of its direct four neighbors…
    The program code that is stored in flash memory is transmitted to the neighbors… this is possible because LumiNet runs on attiny microcontrollers and they don’t have a dedicated bootsection.
    I patched the official Arduino 0014 release in order to add support for this “programming by infection” bootloader and some other features. The user does not see a difference between programming an Arduino and a LumiNet network. Everything is done within the Arduino IDE, no python scripts.

    Have a look at it :)
    There is more information in this thread of the Arduino forum: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254/0

    Cheers,
    René

Comments are closed.