Variable it's a location in the memory of the EV3 Brick that can store a data value.
In other words, they are like magical boxes that hold different kinds of information, and you can use them to make your robot do all sorts of amazing things!
1- Press "Make a variable"
2- Name your "variable"
3- You can see that you have the variable you named.
You can make as many variables as you need.
1- Set "theNumber" variable to 100
2- Repeat "theNumber" is less than the gyro Sensor
3- Motors make a Pivot turn to the right
4- Until"100 degrees" is less than the gyro Sensor (sensor already turn 100 degrees).
5- Stop moving
This is a different robot from Exploration 2. So don't worry if it moves different from yours.
Notice that this gif/video is speed up.
1- Set "counting" variable to "5"
2- Repeat "5 times"
3- Motors making a 360 degrees spin turn at the speed of 50%
4- "counting" add 1, inside the loop
5- The loop run for 5 times. Stop moving
And:
The video/gif it's x4 speed.
This is a different robot: way-2 exploration. So don't worry if it moves differently.
1- Set "counting" variable to "5"
2- Repeat "5 time"s
3- Motors making a 360 degrees spin turn at the speed of 50%
4- "counting" add 1, inside the loop
5- Wait for 1 second
6- The loop run for 5 times. condition is met. Stop moving
1- Set "counting" variable to 0
2- Repeat "counting" is EQUAL to 4
3- Motors make 360 degrees spin turn at the speed of 50%
4- Until"counting" is MORE than 4.
5- Wait for 1 second
6- Stop moving
The number starts counting from 1 (since you set it to "set CountinNumber to 1")
1- Set variable "CountingNumber" to 1
2- Repeat 10 times:
3- Display [together]"Number" and variable "CountingNumber" at line of "CountingNumber"
4- Change "CountingNumber" by 1 (add one everytime it run the loop)
Hint:
-> Variable name: CountingNumber.
-> Use "Repeat" block for 10 times.
Notice it's the same as the Display Variable shown above!