
To access the full video please subscribe to FLLCasts.com
- #1284
- 17 May 2019
The first step for creating a variable is taking a variable block and put it on the canvas. The block is the first one under the red (data) palette.
Variable Name
All variables must have their names as a way to distinguish them. That is why it is extremely important to choose a proper name for the variable. At first, that may seem as a silly task and you will prefer to name your variable with names such as "a" or "var1" or "asdf".
However, once you start working on more complicated tasks, where you will need multiple variables you will get into the situation where you have a project with variables that are hard to distinguish. Probably you will be able to know what a and b store during the time you work on your program, but after a few days it would be impossible, set aside for someone else. It is important the variable names are descriptive enough so that another person could easily understand your program. That program looks a lot better:
To set the name of the variable click on the upper right corner of the block and from the list, select Add Variable
Then enter the name you have chosen in the popup window and select ok.
Тhe last step of creating a variable is to set its initial value. The example above shows how to create a variable named "count" with initial value 0.
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons

Instructors Remote Training
If you are working with students and you want to introduce Robotics to your class or you want to mentor a FLL team, but you are insecure about your technical knowledge in the Robotics field, then this is the right place for you. Having in mind teachers' busy schedule, we have design two different schedules and added an option to design one just for you. FLLCasts's Mindstorms EV3 Robotics Online Training is the perfect match for any teacher.
After the completion of each task the participant has to upload his solution for verification.
- 136
- 280:11
- 156

Robotics with LEGO - Level 3.5 - Measuring tools
The sixth level of the Robotics with LEGO curriculum for students in sixth or seventh grade.
In this level, we introduce student-created myBlocks. Any functionality that is used in several places in a program is grouped into myBlock thus shortening the program's length. Students create blocks that return the result of calculations as an output parameter. Input parameters can change the calculations in the myBlocks. The robot constructions measure physical properties like linear or rotational speed, the fuel level in a tank, or length, area and volume.
- 58
- 0:00
- 185

Lesson 5 - Piggy bank. Counting money
Remember to provide feedback to students regularly. It's important to give structured feedback in the form of a grade. Today, you'll need to grade your students following this article.
- 7
- 5
- 2
- 3d_rotation 1

Robotics with LEGO - Level 4.0 - Kinesthetic and Memory Game (in development)
The seventh level of the Robotics with LEGO curriculum for students in sixth or seventh grade.
In this level, student develop a memory training game. The player must remember series of actions like press a button, shake a pole, pull a lever, show one of many colors. In order to program the game, students use many variables and modify their states. Students create their own custom sounds and images, in order to reflect their own personality in the game. In the end of the level, the game stores top scores even after a full shut down with the help of text files.
- 59
- 2:58
- 200