This block works for both EV3 Robot and Ruby Robot!
The Variable block provides the value of the selected variable.
The initial value of the variable is first set by the Declare Variable block.
The value of the variable can be changed at any point in a program using the Set Variable block.
To apply the Variable block to a program:
- Add a Variable block to the program from the block library.
- From the block's drop-down menu, select the desired (previously declared) variable.
Provides the value of the selected variable. Can be used in place of a data block.