Blocks Area

Variables

📦 Variables – Your “Memory Boxes”

What it is: Boxes where you store data for later use.

What it does: Stores information for later use.

Example: Saving a game score or the temperature measured by a sensor and then using it.

👉 They are the robot’s short-term memory.

 

đź§© Fun Guide to Variables Blocks (Clu-blocks Pro)

🎒 Important! Variables are like backpacks for your robot — they hold numbers, words, lists, or anything you want to remember and use later. You can name them, change them, and check what’s inside!

#BlockWhat it doesDropdown optionsWhat the options mean
1Global variableCreates a variable that works everywhere—You give it a name and choose what type of data it holds
2valueSets or shows the value of a variable—You can assign a number, word, list, or anything else here
3int (type selector)Chooses the type of data for the variableint, float, boolean, string, list, tuple, dictionary, set, byteint: whole number
float: decimal
boolean: true/false
string: text
list: group of items
tuple: fixed group
dictionary: key/value pairs
set: unique items
byte: raw data
4get typeChecks what type of data is inside a variable—Tells you if it’s a number, text, list, etc. — great for debugging
5data type intSets the data type for a variableSame as aboveYou choose what kind of data the variable will hold
6Packed IteratorGroups multiple iterators together—Lets you loop through several things at once — like a combo pack
7Unpack IteratorSplits a packed iterator into partsIterator, dictionaryIterator: goes through items one by one
dictionary: splits key/value pairs

đź§  Quick Tips for Students

  • Use variables to store scores, sensor readings, names, or anything you want to reuse.
  • Always choose the right data type — it helps your robot know how to handle the info.
  • Use get type when something’s not working — it helps you figure out what’s inside.
  • Use packed/unpacked iterators for advanced loops — like going through a list of sensors or commands.
On this page