3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Autonomous, Self-Assembling Robots

Step 5Microcontroller code

microcontroller code
i've attached the AVR microcontroller code below. the code implements the following self-assembly algorithms which are shown in the videos:

1) line-forming. a mixed set of yellow and green tiles will assemble into yellow lines and green lines.

2) error-correcting crystal formation: a single 'seed' crystal will grow in a spiral to form a perfect checkerboard of yellow and green tiles

3) infection and reprogramming: tiles initially assemble using the crystal-formation algorithm. then a viral tile is introduced which inserts a new program that propagates through the crystal. the crystal breaks up and the units form lines using the line-forming algorithm

4) DNA replication: a single strand (4-mer, 5-mer, etc) is introduced into a pool of free units. the DNA is exponentially replicated using an error-correcting algorithm with only local state and local message-passing - just like the real thing.

each unit is programmed with the code which contains all algorithms. then, a special 'programming' unit is used which can easily set the active algorithm and active color of each unit.

« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
524
Followers
47
Author:dan(MonkeyLectric)
Dan Goldwater is a co-founder of Instructables. Currently he operates MonkeyLectric where he develops revolutionary bike lighting products. He also writes a DIY column for Momentum magazine.