LEGO® Powered Up programming blocks
Programming blocks come in a range of types and colors to tell you what type of block you’re using.
Here are some examples of commonly used programming blocks. If you’re not sure what a block does and it’s not listed here, you can try it in the app or see our full programming block guide. Part of the fun of LEGO Powered Up is in the experimentation, play, and learning.
Yellow Flow Blocks
Yellow blocks control the flow of your commands. You can use them to start a program, stop a program, pause a program or even loop commands.
|
This block starts the program. |
![]() |
|
![]() |
This block will loop the program section for a set number of times. |
![]() |
This block will loop the program forever! |
Orange Sensor Blocks
Orange blocks work with the color and distance sensor, the move hub’s tilt sensor, remote control and WeDo 2.0 sensors. These blocks will trigger an action when a sensor on your model detects something.
| Use the color sensor to trigger an event when a specific color is sensed. |
![]() |
Wait for the color sensor to detect the color chosen in the block. |
| Get current color measured by the sensor. |
![]() | Get the current ambient light level measured by the sensor. |
| Triggers when the distance measured by the sensor is less than the specified distance. |
| Use internal gyroscope to trigger an event based on orientation of the hub. Wait for the hub orientation to be equal to hub orientation. |
| Wait for the hub orientation to be equal to hub orientation. |
Green Motor or Movement Blocks
Green blocks get your model moving! You can differentiate between tacho motors (for controlling speed and position) and basic motors (to drive full speed).
| Sets power to the motor. Positive numbers rotate clockwise and negative numbers rotate counterclockwise. |
![]() | Removes power from the motor and will slowly stop the motors. |
![]() | Stops the motor. |
Purple Sound and Light Blocks
Purple blocks can play sounds through your device’s speakers, change the color of the lights on the move hub, color and distance sensors. These blocks also control the lights on the LED-light.
| Sets the color of the sensor LED. |
![]() | Sets the hub LED to show color. |
![]() | Sets the light brightness on the connected to the specified port. |
![]() | Sets the light brightness on the connected to port (left parameter) but sets the four LED half-circles on the sensor individually. From left to right, they affect:
|
![]() | Plays the selected sound from the house sound library. |
![]() | Plays the selected sound from the whistle sound library. |
![]() | Plays the selected sound from the train sound library. |
![]() | Plays the selected sound from the car sound library. |
![]() | Plays the selected sound from the plane sound library. |
![]() | Plays the selected sound from the dog sound library. |
![]() | Plays the selected sound from the cat sound library. |
![]() | Plays the selected sound from the fart sound library. |
![]() | Plays the selected sound from the horn sound library. |
![]() | Plays the selected sound from the crowd sound library. |
![]() | Plays the selected sound from the robot sound library. |
![]() | Plays the selected sound from the target sound library. |
Teal Widget Blocks
Teal blocks let you control your model with widgets.
| Reports the state (true/false or 0/1) of the Widget Canvas' button widget with Channel-ID (1st parameter). |
| Reports the state (true/false or 0/1) of the widget canvas' toggle widget with Channel-ID (1st parameter). |
![]() | Reports the state of the widget canvas' multibuttoned widget with Channel-ID (1st parameter), as an axis. This mean: If the lower button is pressed, it reports -100, if the upper one is pressed, 100. If neither is pressed, 0. |
![]() | Instructs the widget canvas' speedometer, integer-display or any other display with Channel-ID (1st parameter) to show the value (2nd parameter). |
![]() | Reports the position (- 100 to 100) of the widget canvas' slider widget with Channel-ID (1st parameter). |
![]() | Reports the amplitude (- 100 to 100) of the widget canvas' joystick widget with Channel-ID (1st parameter). The further away the joystick is pulled from the center, the higher the number will be. In the upper half of the joystick, the numbers reported will be positive. In the lower half, negative. |
![]() | Reports the angle (normalized to -100 to 100 not in degrees, which would be -90 to 90!) of the Widget Canvas' joystick widget with Channel-ID (1st parameter). If the joystick points directly up or down (regardless of amplitude), the block outputs 0. If the joystick's handle is then motioned clockwise, the number become negative and decrease until they reach -100 at directly left or right. If rotated counter-clockwise, the number is positive and increases towards 100. |
If you have any questions about any of the blocks above or need help with anything else, get in touch with us.