the wait block
A wait block is a block that pause the program at its current point until its condition is met. These conditions can be either sensor or value based. A sensor wait means that the block will pause the program until it receives something from a specific sensor. In the case of a light sensor, it could be that it is waiting for a specific light value for example. The other option is a value. The values are either numeric or logic type. The wait block has many different looks below only because the image will change dependent on what it is waiting for. The colour and basic layout of the block stays constant (Examples Below).
The settings inside change with each sensor they are waiting for but there are a couple of things that are the same every time. First there is Control. This option allows you to set whether the block should wait on a sensor or wait for a length of time.
If Time is selected in Control then the last option is Until. This is where you can set the length of time you want the block to wait for in seconds.
If Sensor is selected in Control then the next option is Sensor. This sets what sensor the block should wait for. Next is Port. This tells the block which port the sensor is in. And finally there is Until. This is where you set the value of the sensor that you want the block to wait on. For some of these there is a sliding bar with one side being orange. In this case it means it is waiting for any value in the orange area.
NOTE: For the light sensor option there is an extra option called Function. This tells the light sensor whether it is to generate light or not. Generating light means it is in reflected light mode and will look for colours on a surface. Not generate light mode means it is looking for ambient light in a room.
If Time is selected in Control then the last option is Until. This is where you can set the length of time you want the block to wait for in seconds.
If Sensor is selected in Control then the next option is Sensor. This sets what sensor the block should wait for. Next is Port. This tells the block which port the sensor is in. And finally there is Until. This is where you set the value of the sensor that you want the block to wait on. For some of these there is a sliding bar with one side being orange. In this case it means it is waiting for any value in the orange area.
NOTE: For the light sensor option there is an extra option called Function. This tells the light sensor whether it is to generate light or not. Generating light means it is in reflected light mode and will look for colours on a surface. Not generate light mode means it is looking for ambient light in a room.