Arduino sketch programs its peers

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 ;-]

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

Discuss this article with the rest of the community on our Discord server!

ADVERTISEMENT

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK