You are here

LEGO Segway

José F. Ruiz gave a talk at FOSDEM yesterday on using Ada (and matlab and other associated bits of stuff) to program a LEGO robot that balances itself the same way a Segway does. That is, it measures the rotational position of the wheels, the robot's sense of balance (via a gyroscope) and computes whether it needs to move forward or backwards to stop itself from falling over.

It is also self-stabilizing, can be remotely controlled via Bluetooth, and doesn't blindly bump into walls.

And if that wasn't impressive enough, it worked! Well, OK, he knew it would work, since he got the gig to speak at the conference. However, he had never tested it on a slope. If the controller program was correct ("correct" in the formal sense of the word) it should work on a sloped surface. Testing is irrelevant, since the maths say it's possible. But as Knuth said, "I have only proved it correct, I haven't tested it." So he put it on the slope of the lecturn. And switched it on.

And it worked!

The place errupted, and he won teh interwebz :)