Wait for condition flow block

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:

  1. Navigate to the Application control view
  2. Observe that when the program starts, only sound from the car sound library is played
  3. Press the Canvas Button
  4. Observe that after pressing the button sound from the whistle library is played

Back to Flow blocks page