This block will continue the execution of a coding strip the moment it receives a positive input.
Wait for condition flow block can accept true
or false
input.
LEGO® Powered UP App coding example: Wait for a condition before executing a command
Step 1: Add coding blocks
- Flow block – Start
- Sound and light Play from the car sound library
- Flow block – Wait for condition
- Widget – Button widget with address 0
- Sound and light Play from the whistle sound library
Step 2: Add Canvas Button with address 0
Step 3:
- Navigate to the Application control view
- Observe that when the program starts, only sound from the car sound library is played
- Press the Canvas Button
- Observe that after pressing the button sound from the whistle library is played