Initializing a variable means giving it a starting value/data.

To access the full video please subscribe to FLLCasts.com
- #1309
- 30 May 2019
Initializing a variable begins by adding a variable block from the red palette:
Every variable must have its own name, with which it can be distinguished. When you want to change the information a variable store inside, you'll need to call it by name, and that's why it's a good practice to give the variables, names that hint what information they store. Also, they have to start with some information already stored in them.
In this example, you can see how a variable with the name "count" is initialized with the starting value of 15:
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