Drive a square using gyroscope (Lego Dance): Difference between revisions

From wikiluntti
Line 18: Line 18:


== 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 ==

Revision as of 13:20, 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:

Drive 0 degrees, 90 degrees, 180 degrees and finallu 270 degrees.

We use two different methods.

  1. Drive using gyroscope but turn using simple steering block without gyro.
  2. Drive and turn using gyro. This method requires variables, but is still rather easy.

The code:

Exercises

  1. Turn one more time such that the ending and starting direction is the same.
  2. Make a larger square.
  3. Make the robot end at the exact starting position.
  4. Drive faster or slower.
  5. Check the meaning of c variable. Make it smaller or larger.
  6. Drive a pentagon and hexagon.
  7. Drive a spiral
  8. 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.