Driving straight using gyroscope (Lego Dance): Difference between revisions

From wikiluntti
Line 5: Line 5:
The plan:
The plan:
[[File:LineExample ManimCE v0.13.1.gif|thumb|The plan]]
[[File:LineExample ManimCE v0.13.1.gif|thumb|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:
[[File:DriveStraight.png|thumb|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.


<youtube>mKhBmhKoZSg</youtube>
<youtube>mKhBmhKoZSg</youtube>

Revision as of 12:28, 19 December 2021

Introduction

Theory

The plan:

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:

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.