YouTube home Introducing a YouTube made for gamers


Two Wheel Lego Mindstorms NXT Balancing Robot at LTU





Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Uploaded on Feb 16, 2012

Playing with Legos in the robotics lab at Lawrence Technological University (

This robot uses the HiTecnic gyro sensor to balance on two wheels ( ) and the Lego optical sensor to follow the edge of the line.

A simple proportional controller is used for the line following - the measured reflected light intensity is compared to a target value. If the reflected light is brighter than the target, the sensor is too far into the white tape and a right turn is commanded. If the reflected light is too low a left turn is commanded. The rate at which it turns is proportional to the difference between the target and measured values.

Similarly, if the gyro sensor detects that the robot is falling forward, it commands the wheels to accelerate - or decelerate if it is falling backwards.

Base code can be downloaded from

  • Category

  • License

    • Standard YouTube License


When autoplay is enabled, a suggested video will automatically play next.

Up next

to add this to Watch Later

Add to

Loading playlists...