Topics Covered
Lesson Links
Looping On for Rotations
What happens if you loop the behavior but leave
The Move Steering Block will run with the sensor-set power, but it will “lock in” a power level for each one-rotation move. This is because the program doesn’t get to run the Read Sensor block again until the Movement block is done running. |
Big Delay
If you put a big delay between the Sensor Block and the Move Steering Block, will the sensor from before or after the delay be used?Will the program use the low value from your hand, or the higher value from the wall? Try it!
The reading is taken when the yellow Sensor Block is run, so it will use the low value from the beginning of the program. |
Mini Challenge: Dangerous Wall
You've created a program that slows the robot down as it approaches the wall. But what if you want to stop the robot before it touches the wall?Start from the program you created that makes the robot slows down
as it approaches the wall.
Add a feature that makes the robot plays a sound or or turn to the side
when the robot reaches within 20 cm of the wall.
Don’t try to use a Wait Block inside the loop, it will prevent the program from reaching the Sensor Block to take updated readings!
What would happen if the program stopped repeating the commands?