Page 39 - RoboGenius Pro C6
P. 39
Blocks Description
This block is used to repeat actions multiple times while
Count with i from 1 to 10 by 1
keeping track of a number.
Do
This block stops the program for a certain amount of time
Pause
before continuing.
This block lets the program make decisions. It checks a
if then
condition and if the condition is true, it runs the blocks
inside it. If the condition is false, it skips them.
This block lets the program make choices based on a
if then
condition. If the condition is true, the blocks inside the then
else section run and if the condition is false, the blocks inside
the else section run.
Math
The Math blocks let you do calculations inside your code. These blocks are useful when you want
to set sizes, positions or repeat shapes dynamically instead of using fixed numbers. Math blocks
make your designs smart and flexible. Some of the important math blocks are as follows:
Blocks Description
This block is used to define a point in 3D space or give
X: 0 Y: 0 Z: 0 coordinates. It helps where to place a shape along the X
(length), Y (width) and Z (height) axes.
This block represents the X, Y and Z axis in 3D space.
Axis x
This block lets you do operations between given numbers like
0 + 0
addition, subtraction, division, multiplication, etc.
This block is used to give the random number between the
Random between 0 and 10
given numbers.
This block is used to compare two given values like equal to,
0 = 0
greater than, less than, etc.
This block is used to combine two conditions.
and and: It checks if both conditions are true at the same time.
or: It checks if any of the given condition is true.
not This block is used to reverse the condition.
Introduction to Codeblocks in Tinkercad
37

