Instruction Guide: Advanced My Blocks
This lesson introduces students to the concept of Advanced My Blocks - the NXT-G equivalent of passing a parameter to a sub-routine. Have students watch the "Advanced My Blocks" video from Dale Yocum's NXT Tutorial series.
-
Have students resurrect their program for Obstacle Detection Challenge ("Obstacle Detection" Lesson)
- This time, have the robot slow down as they approach the obstacle, rather than coming to an abrupt stop
-
Have students use Advanced My Blocks and strive for a program with the fewest blocks possible
- Identify repetitive sections of the program and implement Advanced My Blocks to simplify
- The most elegant solution will involve nested My Blocks - a My Block placed inside a another My Block
- The US sensor will be used to adjust the approach speed in an obstacle detection Advanced My Block