Be on the lookout

Students may expect the Stack Decision Maker to run the attached stacks each time a sensor is pressed (just like the sensor watcher). It is important to help them understand that the stack decision maker  asks the question once at the exact moment when its turn comes as the commands are carried out. The timing of incoming input is key here.

What you can do: Show students the Timing program in Transparency  #3. Go down the program block by block, asking the students what the robot would do as each block is carried out. When you reach the Yes or No block, say that you are pressing the sensor and ask the students which way the program is going to proceed (Yes branch).

Repeat this exercise, only this time, donít press the touch sensor, or press it too late. Ask them to predict which way the program will go.  Point out that input must come exactly when the sensor block is evaluated. If it comes too early or too late, the condition will be considered false, and the No branch will execute


© The LEGO Group

Close Window