Cyber Robotics 101 Teacher's Guide
What makes some algorithms better than others?
In this lesson, students learn to use the gyro reset to set the gyroscope back to zero, and investigate the advantages and disadvantages this method has compared to programming specific orientations into the robot. This builds upon the previous lesson, in which students began to use the gyroscope and compare these turns to timed turns. Students start with a quick introduction to the gyro reset, and how it’s needed to make proper use of the repeat block in conjunction with the gyroscope. After some practice in the context of square spirals, students expand their skills to use the gyro reset and repeat blocks with various types of shapes.
Use the gyro reset to set the gyroscope back to zero
Identify criteria for one algorithm to be better than another
Use a repeat block in conjunction with the gyroscope
Use the gyro reset to set the gyroscope back to zero
Check for mission success in ‘Triangular Tribulations’ or ‘Octo-go-Round’.
Identify criteria for one algorithm to be better than another
In reflection question 1, check that students have included at least two relevant criteria for evaluating algorithms.
Use a repeat block in conjunction with the gyroscope
Check that students have used a repeat block to successfully complete ‘Triangular Tribulations’ or ‘Octo-go-Round’.
Slideshow: Gyro Reset
Wait Until support article
The Wait Blocks video tutorial
Gyro sensor support article
What are two ways that one algorithm can be better than another?
Student answers may vary, but may include criteria having to do with impact of the execution of the program, such as collecting more fruit or getting to the target faster, or may concern programmer experience, such as the ease with which an algorithm can be understood or updated. Students might point out the length of the code which is a part of ease with which an algorithm can be understood. Students may also note that some algorithms work in a variety of circumstances, or will work without pre-existing knowledge of the exact mission the robot is to solve.
Why is the Reset Gyro block important, even though it’s possible to complete the missions without it?
Students should recognize that the Reset Gyro block allows them to leverage patterns and repetition to make their programs easier to code and understand. Without the reset gyro block, each turn would need to be coded separately, but by using the block, programmers can leverage the fact that the robot turns the same amount, and use a repeat block to make the program simpler.
What are three tips you have for a coder who is just starting to learn about Gyro and Gyro Reset?
Student answers will vary, but check to make sure they accurately reflect the way that the gyroscope is used. Some tips may be to use the HUD to debug a program, turn the robot slowly to increase accuracy, and to use the Gyro Reset when working with patterns such as polygons. You may choose to have students share their tips with each other, either in a class discussion or through an online collaboration tool.
Description
Reflection on Gyro Sensor
Timing
5 minutes
Description
Let students complete missions: 1-7
Pack: Gyro Reset
Timing
20 minutes
Description
Class Conclusion Questions
Timing
10 minutes
Familiarize yourself with the above resources.
Allow students to complete the missions on their own time.
Do not insist on the students fully understanding the concepts of rotational speed, feel free to skip these slides if you feel your students are not ready for it.
Q1. Which category is the ‘Gyro Reset’ block found in?
A1. In the ‘Sensor’ Category.
Q2. If the robot turns 70 degrees to the left, and then 86 degrees to the right, and then runs a gyro reset block, what will its gyro read at the end of the code?
A2. Zero degrees.
Q3. In a repeat loop that uses a ‘Wait Until Gyro’ block, should the ‘Gyro Reset’ block come before, or after the ‘Wait Until Gyro’ block?
A3. It doesn’t matter. It can be either before or after.