Closer View of the WAIT-for-SENSOR blocks

In the Common palette description (see earlier post) there was one item that wasn't shown. The WAIT toolbar item (hourglass, 5th down from top) has a flyout menu shown here:


Wait until the Touch Sensor is triggered.

Wait until the Light Sensor is triggered.

Wait until the Sound Sensor is triggered.

Wait until the Ultrasonic Sensor is triggered.





Wait for Time. (you specify time in seconds)

Wait for NXT Button to be pressed.

Wait for Receive Message (BT).

Wait for Timer (can use 1 of 3 internal timers)

Comments

Anonymous said…
Based on previous conversations, I presume that 'Control' also has a 'variables' dropdown as well, allowing you to, for example, wait until a user defined variable hits some threshold (high or low).

Thanks Jim! Looking forward to seeing how you can have two simultaneous tasks running, and how you can get them to interact...
The "Control:" option only has two items to select from in the drop-down menu: Sensor and Time.

Selecting Time changes it to the generic "Time" block where the block waits for a set period of time... Selecting Sensor allows you to access the 2nd drop down which gives you these selections:

Light Sensor
NXT Buttons
Receive Message
Rotation Sensor
Sound Sensor
Timer
Touch Sensor
Ultrasonic Sensor

From the fly-out menu, the only blocks that aren't available by default are the NXT Buttons, Receive Message, and Rotation Sensor... these you have to select from the drop-down menu after dropping in another WAIT-for-Sensor block. I don't know why these 3 aren't shown as blocks to drop-in other than the fly-out menu would have 8 items in it and that might be more than the programmers wanted to have visible in a fly-out menu.
Anonymous said…
NXT buttons, Bluetooth Message and Rotation Sensor are all what I would consider 'advanced programming' as well.

NXT buttons implies some kind of input capability.

Rotation Sensors will usually be handled directly with the motor 'behind the scenes' from what I can tell.

Bluetooth Messaging is by definition advanced, most bots won't even be aware that they can do such things.

Thanks for the followup!
Brian Davis said…
Yes, you can use the NXT button for input to your program. These are essentially treated just like any other sensor, and allow you do do a lot of fun on-screen stuff. They do not have a block that waits for any keypress, and then outputs what key was pressed, but it's fairly easy to make such a block using the MyBlock ability (yes, more is coming on that soon).

--
Brian Davis

Popular Posts