46
Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program Reference: LEGO MINDSTORMS NXT Help & Support Pages

Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Embed Size (px)

Citation preview

Page 1: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Reviewing Common Blocks

for St. Agnes Elementary School Teachersby

Jenny ChangFeb. 26th, 2007

USC & University Neighborhood Outreach Robotics STEM program

Reference: LEGO MINDSTORMS NXT Help & Support Pages

Page 2: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Move Block1. The letters at the top right corner of the block show which of your NXT’s ports will be controlled.

2. This icon shows which direction your robot will go.

3. This icon shows the power level. Your robot’s speed may also be affected by other conditions, like the surface it is moving over or whether it is moving up or down a slope.

4. This icon shows whether you have set the Duration property to unlimited, degrees, rotations, or seconds

Page 3: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Move Block (cont.)

1.This icon shows that the Direction property is set to “stop”. This setting will stop all motors.

Page 4: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Configuring the Move Block

1. Select the motors you would like to control. Motors will be synchronized, going forward or backwards at exactly the same power.

2. Choose whether the motors will go forward, go backwards, or stop. Selecting Stop will also reset the motors.

3. Move the slider to set a curved path for your robot. With the slider all the way to either side, your vehicle will spin in place.

4. This slider and the editable input box will let you set the power level [0-100%].

Page 5: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Configuring the Move Block (cont.)

1. By choosing Time, Rotation or Degrees you can control how far your robot will travel.

2. Choose whether the motors will brake or coast after they’ve finished their action. If you want your robot to stop precisely at an exact location, set the motors to brake. This may wear out battery on a slope because the motors are doing work to keep the robot in place.

3. The feedback boxes will count how many degrees or full rotations your motors turn. Press the reset button to return the values to zero.

Page 6: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Motor versus Robot Direction

● When you set a Move or Motor blocks' direction, you are specifying the direction the motor will spin. This may be different than the direction your robot actually moves. The image below shows a motor spinning in the default, forwards direction.

Page 7: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Record/Play Block

● This block lets you record an action that you act out with your robot. It does this by remembering how many times the motors turn on your robot and then replaying the correct number of turns when you select “run” on your Record/Play block and run your program.

● 1. The displayed icon shows whether the block is set to record or play.

Page 8: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Configuring the Record/Play block

1. Use the text field to name the motion that you are going to act out.

2. Check the output ports that you would like to record. If you have motors connected to ports B and C, check the B and C checkboxes.

3. Set the length of time you would like to record in seconds.

Page 9: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Configuring the Record/Play block (cont.)

● If you choose to play an already recorded Record/Play file, the configuration panel will look like the one above.

● 1. Type in the file name of the recorded action you want to replay. Files that have already been saved on the NXT will appear in the list in alphabetical order. Select the one you would like to play.

● Note: If you record and play an action in the same program, you must remember to type in the same file name in both blocks – the file name will not appear in the list of previously saved actions.

Page 10: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Sound Block● You can use this block to play a sound file or a

single tone. To compose a melody of tones, arrange several sound blocks in a row with each set to play different tones.

● If you select “Wait for completion” in the configuration panel, the sound file or tone will finish playing before the program moves on to the next block. With this item unchecked, the sound file or tone will continue to play while the next block of your program proceeds.

● Choosing “Repeat” will cause a sound file to play again and again.

Page 11: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Sound Block (cont.)

1. This icon shows whether the block will play a sound file or a tone.

2. This icon shows whether the block will start or stop playing a sound.

3. This icon shows the block’s volume. An icon with four orange bars is set to the loudest volume.

4. You can drag data wires from other blocks to this block’s data hub that will affect the Sound block’s properties.

Page 12: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Configuring the Sound Block

● 1. The Action property radio buttons let you choose to play a sound file or a tone that you’ll compose.

● 2. Choose to play or stop playing a sound file or tone.

● 3. Set the volume using the slider. Use the text field to type in an exact value.

Page 13: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

● If you choose to play a sound file (as in the first configuration panel above), you’ll be able to set the following additional properties:

● 4. The Function property will let you set the sound file to repeat so that it plays again and again without stopping. The “Wait for completion” option will be grayed out and no longer available.

● 5. The File property will let you choose the sound file by its name. Look in Sound Files folder of the LEGO MINDSTORMS software on your hard drive for sounds. Click on each name to hear it played.

● 6. If you check the “Wait for Completion” checkbox, the sound file will play to its end before allowing the program to move on the next block.

Page 14: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

● If you choose to play a tone (as in the second configuration panel above), you’ll be able to set the following additional properties:

● 4. The Node property will allow you to compose a tone to play when the Sound block is activated. The small keyboard represents three octaves of the musical scale. The input box next to the stopwatch is for specifying the duration of the note in 1/10s of a second.

● 5. If you check the “Wait for Completion” checkbox, your tone will play to its end before allowing your program to move on the next block in your program. With the box unchecked, your tone will play while the next block of your program proceeds.

Page 15: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Display Block

● By positioning several Display blocks in a row you can create more complex drawings by adding additional images, text and shapes with each new Display block.

● If you want to erase the contents of the screen before beginning, check the “Clear” checkbox.

● If you would like to return to the default LEGO MINDSTORMS icon, select Reset in the pull-down menu.

● The screen measures 100 pixels wide by 64 pixels high.

Page 16: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Display Block (cont.)

● 1. This icon shows whether the block is set to display an image, some text, or a drawing; or whether it will just reset the display to the default icon.

● 2. You can change values dynamically by connecting data wires to this block’s data hub.

Page 17: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

● 1. Use the pull-down menu to choose whether you want to display an image, some text, or your own drawing; or whether you just want to reset the display.

● 2. To erase the contents of the NXT’s screen, check the “Clear” checkbox.

● If you choose to display an image (as in the configuration panel above), you’ll be able to set the following additional properties:

● 3. The File property will you let select the image to display. Click on each name to see a preview. Images are stored in the Image Files folder of the LEGO MINDSTORMS software on your hard drive.

● 4. Use your mouse to move an image, some text, or a drawing around the preview screen to position it. The X and Y input boxes let you precisely position the image. Typing zeros into both boxes will set the image against the left and bottom edges of the screen.

Page 18: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop Block● 1. When a Loop block’s action property is set

to “Forever,” an infinity symbol (∞) is displayed at the bottom of the trailing portion of the block.

● 2. If the “Show Counter” checkbox is selected in the configuration panel, a plug will appear that will allow you to use the number of completed loops as an input elsewhere in your program. You can also use current count to control the loop itself.

● 3. If you choose for a sensor to control the loop, the trailing portion of the Loop block will expand in size revealing an icon for the chosen sensor.

Page 19: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop Forever Configuration

● If you choose “Forever,” any programming blocks within the loop will repeat forever without interruption.

● 1. Check the “Show Counter” checkbox to use the number of loops completed as input to another block. (Example: to increase a Motor block’s Power.)

Page 20: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Time Configuration

● If you choose “Time,” the programming blocks within the loop will repeat until a certain number of seconds have passed. After the time period is up, the loop will end.

● 1. Use this box to type in the number of seconds that the loop should run. If you choose 5 seconds, for example, the loop will end after 5 seconds have passed.

● 2. If the “Show Counter” checkbox is selected in the configuration panel, a plug will appear that will allow you to use the number of completed loops as an input elsewhere in your program.

Page 21: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Touch Sensor

● If you choose “Touch Sensor,” the programming blocks within the loop will repeat until a touch sensor is bumped, pressed, or released. Then the loop will end and the program will go on.

● 1. Choose the port that the touch sensor is connected to.● 2. Use the radio buttons to specify whether you want the

touch sensor to be bumped, pressed, or released to end the loop. Choose Bumped if you want the block to be triggered after a quick press and release of the touch sensor (less than 0.5 seconds in duration). Choose Pressed if you want the block to be triggered at the instant the touch sensor is pressed in. Choose Released if you want the block to be triggered at the instant the touch sensor is released.

Page 22: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Touch Sensor (cont.)

● 3. The feedback box will let you test your touch sensor. When the sensor is activated on your robot, the number “1” will be displayed here. Use the reset button to clear the feedback box.

● 4. If the “Show Counter” checkbox is selected in the configuration panel, a plug will appear that will allow you to use the number of completed loops as an input elsewhere in your program.

Page 23: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Sound Sensor

● If you choose “Sound Sensor,” the programming blocks within the loop will repeat until the sound sensor detects sound in a certain range.

● 1. Choose the port where your sound sensor is plugged in. By default, the block will be set to port 2 for a sound sensor.

Page 24: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Sound Sensor (cont.)

● 2. Use the slider to set the trigger value or type a value directly into the input box. Select the radio button to the right of the slider if you want the loop to end when sound levels are higher than the trigger value; select the left radio button to end the loop when sound levels are lower than the trigger value. You can also use the pull-down menu to set the portion of the slider that will end the loop.

● 3. The feedback box displays the current sound reading (0-100%). You can use it to try out different trigger values.

● 4. If the “Show Counter” checkbox is selected in the configuration panel, a plug will appear that will allow you to use the number of completed loops as an input elsewhere in your program.

Page 25: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Switch Block

● 1. This icon indicates the sensor or other condition that will cause the block to choose between the two rows of programming blocks. In this case the current status of a touch sensor will cause the program to switch.

● 2. The upper blocks will run if the touch sensor is pressed.

● 3. The lower block will run if the touch sensor is not being pressed.

Page 26: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Switch Block (cont.)

● 1. If you’ve chosen to control the Switch block using the Value condition, a data wire plug will appear at the bottom of the leading edge of the Switch block; you will have to attach a logic or number data wire to this plug from some other block to control the switch.

Page 27: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Switch Block (cont.)

● 1. By de-selecting the “Display Flat View” checkbox, the Switch block will use a tabbed interface to show the alternative sequences of programming blocks. By clicking on a tab, you will be able to view and edit the blocks and see which condition will cause those particular blocks to run.

● Note: When you want to attach a data wire from outside to a block inside the Switch block, you need to de-select the “Display Flat View” so the Switch block appears with its tabbed interface.

Page 28: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Wait Block

● This block lets your robot sense its environment for a certain condition before it continues. Use the slider or type in a value to set a trigger point so that the program continues when sensor values are below or above it.

Page 29: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Wait Block (cont.)● 1. The number or letter at the top right corner

of the Wait block shows the port the block is monitoring. The configuration panel, which is described below, will let you change ports if necessary.

● 2. If you have chosen to wait for a light, sound, or ultrasonic sensor, this icon indicates at what level the trigger point is set; the more colored bars displayed, the higher the trigger point. If you have chosen to wait for a touch sensor, the icon will display the touch sensor condition (bumped, pressed, or released) that will trigger the block and allow the program to move on.

Page 30: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

More on Loop Configuration

Page 31: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Light Sensor

● If you choose “Light Sensor,” the programming blocks within the loop will repeat until a light sensor measures a certain intensity of light. Then the loop will end and the program will advance.

● 1. Choose the port where your light sensor is plugged in. By default, the block will be set to port 3 for a light sensor.

● 2. Use the slider to set the trigger value or type a value directly into the input box. Select the radio button to the right of the slider if you want the loop to end when light levels are higher than the trigger value; select the left radio button to end the loop when light levels are lower than the trigger value. You can also use the pull-down menu to set the portion of the slider that will end the loop.

Page 32: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Light Sensor (cont.)

● 3. If you check the “Generated Light” checkbox, the light sensor will turn on its own small light source and detect this light if it is reflected back to it.

● 4. The feedback box will display the current light reading.● 5. If the “Show Counter” checkbox is selected in the

configuration panel, a plug will appear that will allow you to use the number of completed loops as an input elsewhere in your program.

Page 33: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Ultrasonic Sensor

● If you choose “Ultrasonic Sensor,” the programming blocks within the loop will repeat until the ultrasonic sensor detects an object at a certain distance.

● 1. Choose the port where your ultrasonic sensor is plugged in. By default, the block will be set to port 4 for an ultrasonic sensor.

● 2. Use the slider to set the trigger value or type a value directly into the input box. Select the radio button to the left of the slider if you want the loop to end when the ultrasonic sensor detects an object closer than the trigger value; select the right radio button to end the loop when the ultrasonic sensor detects an object farther away than the trigger value. You can also use the pull-down menu to set the portion of the slider that will end the loop.

Page 34: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Ultrasonic Sensor (cont.)

● 3. Select to read values in Centimeters or Inches.● 4. The feedback box will display the current ultrasonic

sensor reading.● 5. If the “Show Counter” checkbox is selected in the

configuration panel, a plug will appear that will allow you to use the number of completed loops as an input elsewhere in your program.

Page 35: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with NXT Buttons

● If you choose “NXT Buttons,” the programming blocks within the loop will repeat until the chosen NXT buttons is bumped, pressed, or released.

● 1. Select which NXT button will send out a “true” signal when activated (and end the loop).

● 2. Choose Bumped if you want the chosen button to be activated after a quick press and release. Choose Pressed if you want the chosen button to be activated at the instant the button is pressed in. Choose Released if you want the chosen button to be activated at the instant the button is released.

Page 36: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with NXT Buttons (cont.)

● 3. The feedback box will display a “1” when the chosen NXT button is bumped, pressed or released (according to the configuration you’ve set).

● 4. If the “Show Counter” checkbox is selected in the configuration panel, a plug will appear that will allow you to use the number of completed loops as an input elsewhere in your program.

Page 37: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with (Built-in) Rotation Sensor

● If you choose to “read” a rotation sensor, the programming blocks within the loop will repeat until the rotation sensor reaches a certain value; then the loop will end and the program will advance. If you choose to “reset” the rotation sensor, the sensor will be reset to zero after each loop; the block will continue to loop until the rotation sensor can reach the trigger value during one of the loops.

● 1. Choose the port where your motor is plugged in.● 2. Choose to read or reset a rotation sensor.● 3. Use the radio buttons to set the direction you want:

forwards or backwards.

Page 38: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with (Built-in) Rotation Sensor (cont.)

● 4. Choose to count either Rotations or Degrees by using the pull-down menu.

● 5. Type the number of rotations or degrees you want to go by before the loop is ended (allowing your program to go forward).

● 6. The feedback box will display the current number of rotations or degrees. Use the reset button to clear the feedback box.

● 7. If the “Show Counter” checkbox is selected in the configuration panel, a plug will appear that will allow you to use the number of completed loops as an input elsewhere in your program.

Page 39: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Timer

● If you choose to “read” a timer, the programming blocks within the loop will repeat until one of the NXT’s internal timers reaches a certain time value; then the loop will end and the program will advance. If you choose to “reset” a timer, the timer will be reset after each loop; the block will continue to loop until the timer can reach its trigger value during one of the loops.

Page 40: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Timer (cont.)

● 1. Choose the NXT timer that you would like to monitor.

● 2. Choose to read or reset a timer.● 3. Type a time value (in seconds) in the input

box.● 4. If the “Show Counter” checkbox is selected

in the configuration panel, a plug will appear that will allow you to use the number of completed loops as an input elsewhere in your program.

Page 41: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Temperature Sensor

● If you choose “Temperature* Sensor,” the programming blocks within the loop will repeat until a temperature* sensor measures a certain temperature. Then the loop will end and the program will advance.

● 1. Choose the port where the temperature sensor is plugged in. By default, the block will be set to port 4 for a temperature sensor.

Page 42: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Temperature Sensor (cont.)

● 2. Use the slider to set the trigger value or type a value directly into the input box. Select the radio button to the right of the slider if you want the block to be triggered by temperatures higher than the trigger value; select the left radio button to trigger the block with temperatures lower than the trigger value. You can also use the pull-down menu to set the “true” portion of the slider.

● 3. Select to read values in Celsius or Fahrenheit.● 4. The feedback box displays the current temperature

reading.● 5. If the “Show Counter” checkbox is selected in the

configuration panel, a plug will appear that will allow you to use the number of completed loops as an input elsewhere in your program.

Page 43: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Count

● If you choose “Count,” any programming blocks within the loop will repeat until the Counter reaches a set number of repetitions.

● 1. Use this box to type in the number of repetitions that will end the loop. If you type “2,” for example, the loop will end after the programming blocks in the loop have been run twice.

● 2. Check the “Show Counter” checkbox so that you can wire the left side of the loop to the right side (where the “count” plug appeared). With the left and right sides connected, the program will be able to count the number of completed loops and leave the loop when the count reaches the number you set.

Page 44: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Logic

● If you choose “Logic” and connect an input data wire to the Loop block’s trailing portion, any programming blocks within the loop will repeat as long as the Loop block is receiving a true or false logic signal through the data wire. When a specified logic signal is received, the loop will end.

● 1. Choose which type of logic signal, true or false, will end the loop.

● 2. If the “Show Counter” checkbox is selected in the configuration panel, a plug will appear that will allow you to use the number of completed loops as an input elsewhere in your program.

Page 45: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Receive Message

● If you choose “Receive Message,” the programming blocks within the loop will repeat until your NXT receives a certain Bluetooth message. Then the loop will end and the program will advance.

Page 46: Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program

Loop with Receive Message (cont.)

● 1. The pull-down menu will let you select the message type (Text, Number, or Logic) of the message that you expect to receive.

● 2. To compare the incoming message to a test message, either type in the test text or number (if you have chosen Text or Number respectively as the format), or use the radio buttons to choose the test logic value (true or false).

● 3. Choose the mailbox number where the incoming message will arrive.

● 4. If the “Show Counter” checkbox is selected in the configuration panel, a plug will appear that will allow you to use the number of completed loops as an input elsewhere in your program.