Scratch Programming Blocks Reference

Intelino Scratch offers a comprehensive set of programming blocks that control the train's many functions. Below is the reference guide for all of the intelino blocks currently supported in our editor:


Do something when the train's movement state changes. The difference between the paused and stopped states is that the former indicated a state where the train is set to resume driving after some time (e.g. when a white-red action snap command is read). The latter indicated a state where the train is idling (e.g. the power button was pressed to stop the engine).


Do something when the train's distance travelled (in centimeters) is more than or equal to some value.


Start driving forward or backward at a set speed (in centimeters per second).


Drive forward or backward a set distance (in centimeters) at a set speed (in centimeters per second).


Stop driving the train.


Pause driving the train for some time (in seconds).


Get the steering direction value for the next split. This block can be helpful when you need to check if there is a choice already stored on the train.


Get the train's current driving speed (in centimeters per second).


Get the train's current distance travelled (in centimeters).


Reset the distance travelled to 0.


Decouple the train's wagon.


Set the color of the top LED, headlights or taillights using a HSV color picker.


Set the color hue of the top LED, headlights or taillights. The hue value ranges between 0 and 99. Think of the hue as a circular spectrum of color shades. So whenever its value overflows (e.g. gets larger than 100), the color goes back to the start.


Set the RGB color of the top LED, headlights or taillights. RGB values range between 0 and 255.


Do something when a split track is detected by the train. This block can be used to set the steering direction decision for the next split.


Set the steering direction decision for the next split. The default value means the decision will defer to the train's choice (e.g. random or set with color snaps).


Next steering decision operand used in conditional statements.


Last steering decision operand used in conditional statements.


Steering decision operand value used used in conditional statements.


Do something when the train detects a custom color command sequence. The command must start with white - magenta colors and you can select the color of the 3rd snap from the dropdown list. Note that this block accepts variables (refer to the numerical color values in parenthesis).


Clear custom commands stored on the train using the Snap Editor in the intelino play mobile app. For example, let's say you created and stored a custom command using the Snap Editor using the white-magenta-yellow sequence. If you use the same color sequence in Scratch to do something, the train would also execute what's stored in the train. In some cases, this may be your intended behavior. But if the command stored on the train conflicts with what you're doing in Scratch, you can use this 'clear stored custom commands' block. 


Do something when the train detects a custom command sequence of up to 4 colors. The command must start with white or cyan and you can select the color of the 2nd, 3rd and 4th snap from the dropdown lists. Note that this block accepts variables (refer to the numerical color values in parenthesis).


Activate or deactivate the default action snap commands stored on the train. If you use the same color sequence in Scratch to do something, the train would also execute what's stored in the train. In some cases, this may be your intended behavior. For example, the WHITE-RED command makes the train stop for 2 seconds. And if you use the previous block to, for example, make the WHITE-RED command change the top LED color, both 2 sec. stopping and the LED color would get executed. In case the command stored on the train conflicts with what you're doing in Scratch, you can set this 'action snap commands' block to 'off'


Activate or deactivate the sound and light effects associated with the default action snap commands. You may want to set these effects to 'off' state if they interfere with what you are programming in Scratch.


Do something when the train's color sensors detect a color. Note that this block accepts variables (refer to the numerical color values in parenthesis).


Get the color value detected by the color sensor.


Color operand used in conditional statements.




Previous Article: First Programs: 3. Distance

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us