-> Control blocks are what tell your robot what to do and when to do it by using "Loops"
-> A loop is like a magic spell that says, "Do this action again and again until I say stop!"
This block it's to make the robot do nothing but wait for [how many seconds you want].
1- Robot go forward for 450 degrees at the speed of 50%.
2- Then, robot stop and do nothing for 1 second. It waits.
3- Motor A goes up for 250 degrees at the speed of 75%.
Observation: Notice that the robot takes a pause of 1 second.
Telling your robot to stop and wait patiently until a certain condition is met.
1- Robot [starts moving] backward at the speed of 50%.
2- It moves forever UNTIL the "color sensor" find red.
3- Robot stops moving.
Remember that -50% for both, it's the same as saying going backward at speed of 50%
VS
Take a look at the difference between these 2 type of movements blocks:
Notice that without a set amount of degrees, the robot only moves backward, forever, unless there's a condition.
Notice that the robot doesn't listen to the code, it only moves backwards for 600 degrees.
Doing It Again and Again. Make the robot do something the amount of times you want the robot to do.
Remember this code from Movement challenge?
It makes the robot move in a square for 4 times
Now look at this one.
It looks much more simple, and easier to read.
1- Robot moves forward for 500 degrees at speed of 50%.
2- Make a pivot turn of 590 degrees at speed of 40%.
3- Wait for 0.5 seconds
Repeat this 4 times
Forever: make something to repeat limitless times. NO stopping
The light of the robot's navigation buttons change color from orange and green FOREVER.
Notice that the button of the "forever" block is a line. You can't add more blocks under "forever" block.
Is a loop that: [keeps doing something] UNTIL [a certain condition is met]
1- Robot moves forward, without knowing how much.
2- It moves forward UNTIL the "color sensor" read color BLUE
3- The robot stops moving.
You need to add a [stop moving] under the loop.
If not, the robot will move forever, without stopping.