Drive a square using gyroscope (Lego Dance): Difference between revisions
From wikiluntti
(Created page with "== Introduction == == Theory == The plan: The code: <youtube></youtube> == 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 [https://meet-and-code.org/ Meet and Code]. The course is made in collaboration with Robotiikka- ja tiedekasvatus ry.") |
(→Theory) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
The dancing area of Robotic dance is large, and thus a reliable method to drive geometrical forms is needed. This exercise is to drive a square. We show two different methods. | |||
== Theory == | == Theory == | ||
The plan: | [[File:PolygonExample ManimCE v0.13.1.gif|thumb|Drive 0 degrees, 90 degrees, 180 degrees and finallu 270 degrees.]] | ||
The plan: We use two different methods. | |||
# Drive using gyroscope but turn using simple steering block without gyro. | |||
# Drive and turn using gyro. This method requires variables, but is still rather easy. | |||
[[File:Gyro square1.png|thumb|Drive a square ver 1.]] | |||
[[File:Gyro square1b.png|thumb|Drive a square ver 2a, without variables.]] | |||
[[File:Gyro square2.png|thumb|Drive a square ver 2.]] | |||
The code: | The code: Quite easy, only a few coding blocks is needed. | ||
<youtube></youtube> | <youtube>2P1nc3iDSVw</youtube> | ||
<youtube>OqX85YBV9PM</youtube> | |||
== Exercises == | == Exercises == | ||
# Turn one more time such that the ending and starting direction is the same. | |||
# Make a larger square. | |||
# Make the robot end at the exact starting position. | |||
# Drive faster or slower. | |||
# Check the meaning of ''c'' variable. Make it smaller or larger. | |||
# Drive a pentagon and hexagon. | |||
# Drive a spiral | |||
# Attach a pen to the robot and use LOGO drawing. | |||
== References == | == References == |
Latest revision as of 13:33, 19 December 2021
Introduction
The dancing area of Robotic dance is large, and thus a reliable method to drive geometrical forms is needed. This exercise is to drive a square. We show two different methods.
Theory

The plan: We use two different methods.
- Drive using gyroscope but turn using simple steering block without gyro.
- Drive and turn using gyro. This method requires variables, but is still rather easy.



The code: Quite easy, only a few coding blocks is needed.
Exercises
- Turn one more time such that the ending and starting direction is the same.
- Make a larger square.
- Make the robot end at the exact starting position.
- Drive faster or slower.
- Check the meaning of c variable. Make it smaller or larger.
- Drive a pentagon and hexagon.
- Drive a spiral
- Attach a pen to the robot and use LOGO drawing.
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.