Each palette contains programming blocks that share common purpose. We will cover most of them
- 01 May 2017
Here we will introduce the palettes briefly, and later on, will discuss each block in detail.
Green "Action" palette
The green palette is the action palette - here are blocks that make the robot do visible things - move motors, play sound, display something on the screen or make a sound. The "Brick status light" block is also in this palette.
Orange "Flow" palette
The orange palette is the flow palette - controls the flow, the execution, of the program. Start block, wait block, loop, switch and loop interrupt are in this palette.
Yellow Sensors palette
The yellow palette is sensor palette - these blocks measure the values returned from various sensors. An often mistake is to use sensors from this palette, when actually you need a "Wait sensor" block from the orange palette.
Red "Data Operations" palette
"Data operations" is in the red color - block related to calculations that the robot can perform for us. Variables, Arrays, math and logical operations.
Blue "Advanced" palette
The "Advanced" palette is blue and contains various block from different areas that are rarely used even at competition level. One of the most interesting blocks here is the Bluetooth messaging block.
Teal MyBlocks palette
The last palette seems empty (teal color) - here stay programming blocks that you have created yourself!
With the introduction of the wait block you saw that there're other palettes in the lower part of the software. And in this video I'd like to stop at the purpose of these palettes.
First, you know the green palette and these are the action blocks. These are blocks that control the motors. Four blocks - we have one block for controlling the display, one for sound and one - brick status light. We haven't discussed this brick status light but probably in some of the next videos. Then we have an orange palette. And as you can see it's called flow control. These are blocks that control the flow of your program. You can think of the program as a series of instructions that can flow in different directions. And with these four block here we can control the flow of this program. Five blocks - we can even use this start. We also have a yellow palette. And in the set you have a number of sensors and these are the blocks for these sensors. Now, you probably have two or three sensors and here the blocks are more. Why? Because we have, for example, a rotation sensor. And this is a sensor that is embedded in the motors. We also have a timer. And that's a sensor embedded in the brick. And we also have other types of sensors. With these blocks you can control the sensors and from there get some input from the environment around you or around the robot. Then you have the math operations. And here you have simple operations for math like adding, subtracting, multiplying. You also have other more interesting operations like using variables and constants. These blocks here. Like using a race. Or logical operations. We'll discuss logical operations in some of the next modules. We also have some operators and we can use range, we can transfer tax. These are very powerful operations that we can use to somehow manipulate the data that the robot is collecting from the world. Then we have advanced. The dark blue palette. And these are all advanced blocks. And in this advanced blocks what do we consider advance or at least Lego is considering an advance. These are the abilities for the robot to do some messaging. To send a message to another robot. And this other robot can take some actions depending on the message or
we have an operation, let me see it,
for a row sensor value. And it's different from the yellow palette where you have non-raw sensor values and here you have raw. Again, these are advanced and, again we can stop at some of them in the next modules. The last palette that is empty on my side and that's on purpose it's probably empty on your side too is called my blocks. And as you see a block in the program this is a block developed by Lego. And this is a block for moving the motors forward or backward. You can develop a block yourself. You can build your own block for your own behavior. If your behavior is, for example, greeting a stranger. You can build a block that's just one block and with this one block you greet a stranger. Again, we'll show you how to do this. And this is for the palette.
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons