Driving straight using gyroscope (Lego Dance)
From wikiluntti
Introduction
Theory
The plan:

Robot drives a straight line perpendicular to its starting position. If the robot for some reason goes to different direction, the gyroscope will fix the direction. However, the final position might be different.
The code:

We use loop (orange) with gyroscope (yellow) block, math add block (red) and steering (green) block. This is called as a proportional control system, P-controller.
Exercises
References
The Instructors
The course is held in Finnish, though English guidance is possible. The instructors are Markku Leino and Zwenkka Pietilä.
This course is supported by Meet and Code. The course is made in collaboration with Robotiikka- ja tiedekasvatus ry.