This person shows how not to build a balancing robot, which “uses a ‘simple switch as a sensor and stands on only two wheels with inverted pendulum mechanism.'” Video after the break.
The tech in play here is quite simple, and the fact it can stand as long as it does being that top heavy is actually pretty surprising.