The Balancing Cube is a robot that can remain balanced on any one of its corners, even when pushed. Six motorized weights quickly move to keep the robot's weight balanced whenever it is in danger of falling over:
The Balancing Cube is an example of a distributed control platform. Each module....is a self-contained unit with a computer, battery, motor, and inertial sensors (a tri-axis accelerometer and tri-axis rate gyro). So instead of relying on a centralized controller, the modules share their inertial data through a bus network. Then each module combines its own data with the shared data to determine the orientation of the cube -- and command its motor accordingly.
Link via technabob