This glossary is organized by block type and the blocks appear in the same order as in the mBlock environment. There is an image and description of the blocks used. Additionally, extra notes like what is in the drop-down menus of each block are included for your convenience. The drop-down menus in each block will be referred to by number, indicating its position within the block left to right.
These blocks either gather data from the robot as inputs or result in actions of the robot as outputs.
mBot Program
This block starts your script and needs to be at the top of your program.
Movement
This block tells the robot to move or turn in a certain direction and speed.
Motor
This block adjusts the individual motor speeds. M1 should be the left motor and M2 should be the right motor.
LED
Adjusts the LED lights on mBot.
Tone (Buzzer)
Plays a tone and can be used to make buzzer or horn sounds.
Ultrasonic sensor
Measures the distance from the ultrasonic sensor to nearest obstacle.This block can be used as inputs into other blocks, and are especially helpful condition values.
Line follower
Represents the line follower robot component, which has a left and a right sensor. See Student Sheet 3a as part of the lesson resources for Ages 7-11 and Ages 11-14 for more information on the meaning of line follower output values. This block can be used as inputs into other blocks, and are especially helpful condition values.
Line follower
Indicates whether a sensor (leftSide or rightSide) of the line follower robot component is sensing black or white. This block can be used as inputs into other blocks, and are especially helpful condition values.
IR remote
This block is used to program the buttons on the IR remote. This block can be used as inputs into other blocks, and are especially helpful condition values.
These blocks can be used as inputs into other blocks, and are especially helpful condition values.
Wait
Tells your robot to wait a certain number (#) of seconds before moving on to the next line of code.
Repeat
Makes whatever is inside it repeat the indicated number (#) of times. Notice the little arrow indicating everything inside will be run from the top again. These are called loops.
Forever
Makes whatever is inside it repeat continuously forever. Notice the little arrow indicating everything inside will be run from the top again. These are called loops.
If, then, else
Makes whatever is inside it happen IF the specific condition is met. These blocks allow you to write conditional statements. Whether the instructions inside the block will run depends on whether the condition in the first line is met. You can put other blocks into the hexagon in the first line to establish a condition to check for.
These blocks are used to do mathematics and construct conditions used in Boolean logic, such as ‘and’, ‘or’ and ‘not’.
Random number
This block chooses a random number. You can set the boundaries of the number range by typing in numbers.
Less than
Checks if the first value is greater than the second value. The values can be other blocks or numbers that you type.
Equals
This checks if two values are equal. The values can be other blocks or numbers that you type.
Greater than
Checks if the first value is greater than the second value. The values can be other blocks or numbers that you type.
And
Checks if both conditions are true.
Or
Checks if either condition or both conditions are true.
Not
Checks if a condition is NOT true.
Computing | Ages 7-11
Code Smart is a computing and robotics education programme based on driverless car technologies. Code Smart takes students on a journey from complete beginners to code creators.