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

Slides:



Advertisements
Similar presentations
Robofest 2005 Introduction to Programming RIS 2.0 RCX Code.
Advertisements

EducateNXT Follow the Leader Using Bluetooth communication, one robot can be made to follow the actions of a second robot. Features in this presentation:
MS® PowerPoint.
Getting started with LEGO NXT Mindstorms software This is intended to be a short introduction to the LEGO Mindstorms software and programming the LEGO.
Dublin Robotics Boosters NXT-Step Programming Workshop.
EducateNXT Enter the name “Sound Graphing” for your experiment. Real-time Data Logging Click the Switch to NXT Data Logging icon in the top-left corner.
LabView Basics.
NXT Basics: Technic Building and NXT-G Erin Cejka Riecker Center for Engineering Educational Outreach Tufts University.
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Mine Mapping Remote Communication.
This document guides you through using the common features of the InFocus™ Mondopad™ touchscreen display located in this room. Getting Started Power Display.
Microsoft Word 2010 Lesson 1: Introduction to Word.
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Automated Mining Project.
Vex Robotics Introduction to Sensors. introduction to sensors Sensors assist robots in seeing and feeling the physical world through which they travel.
Bluetooth Remote Control
EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Sentry System One-Way Communication.
EducateNXT NXT... an introduction The Kit and the Software.
Introduction to NXT Software and Functionality Bot’oberfest October 15, 2007.
1 ©2006 INSciTE Lab Two Task: Make the program from Lab One (Move forward 5 rotations and turn right 90 degrees) into a MyBlock.
The NXT is the brain of a MINDSTORMS® robot. It’s an intelligent, computer-controlled LEGO® brick that lets a MINDSTORMS robot come alive and perform.
LEGO Mindstorms NXT Programming We will be using the Common Palette for our Robots This is how you download your program onto the brick Drag and drop a.
Creating a MagicInfo Pro Screen Template
Loops and Switches. 1. What kind of blocks are these? 2. Name two kinds of controls that can be specified to determine how long a loop repeats. 3. Give.
1 iSee Player Tutorial Using the Forest Biomass Accumulation Model as an Example ( Tutorial Developed by: (
Program ultrasonic range sensor in autonomous mode
Programming Concepts Part B Ping Hsu. Functions A function is a way to organize the program so that: – frequently used sets of instructions or – a set.
GIRLS Robotic Camp. Let’s Begin Meet and Greet – Camp leaders introduce themselves – Students introduce themselves.
Programming 101 The Common Palette Content provided by Connor Statham (6 th Grade Student) Formatting by Shannon Sieber.
Introduction to the Basic Parts of LEGO’s NXT Robotics
LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals.
Windows Tutorial Common Objects ACOS: 1, 4. Using the Taskbar 1. Using the taskbar, you can switch between open programs and between open documents within.
EV3 Workshop Oct 3, 2015 Instructor: Chris Cartwright
NXT Basics: Technic Building and NXT-G Erin Cejka Riecker Center for Engineering Educational Outreach Tufts University.
Introduction to Microsoft publisher
Negative Power or Negative Rotation makes robot go backwards. But if both are negative, the robot will go forward! Move Steering Block.
Sentry System Multiple Sensors
Conditions and loops Day 4 Computer Programming through Robotics CPST 410 Summer 2009.
Lego MindStorm An Introduction to Blocks. Blocks Blocks are used to give instructions to your robot. There are many types of blocks You can use the blocks.
Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions.
Find the Mindstorms Icon on the computer.. To start a new program click go.
Robotics NXT-G: variables, file Rotation sensor Lab: Use buttons to hit specific ball. Homework: Postings. Start planning mapping the room.
LEGO® MINDSTORMS® NXT Move Block.
Programming 101 The Common Palette Content provided by Connor Statham (9 th Grade Student) Formatting by Shannon Sieber.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
Data Hubs and Wires. Begin by adding a basic Move block, 5 rotations 75% power.
Mindstorm NXT-G Introduction Towson University Robotics.
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
PhotoShop Creative Suite 3 Chapter 1 The Work Area.
CIS 205—Web Design & Development Flash Chapter 3 Working with Symbols and Interactivity.
MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering.
MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering.
Lego Mindstorm Robots 9797 kit.  Students will learn how to identify how to detect a change in a condition.  Students will learn where and how to identify.
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Sentry System Two-Way Communication.
NXT Mindstorms Kit Programming
Exploring Computer Science Lesson 6-5
Understanding Communication with a Robot? Activity (60 minutes)
Introduction To Programming with LEGO NXT 2
Loops and Switches Pre-Quiz
Module F: Presentation Understanding Robot Fundamentals
Displaying sensor values while a robot is running
Introductory Presentation
Sensors and Logic Switches
INTERMEDIATE PROGRAMMING LESSON
Exploring Computer Science Lesson 6-5
INTERMEDIATE PROGRAMMING LESSON
Switch Blocks check a value and choose a path based on that value
Storing Values as Variables
Loops and Switches How Do You Make Loops and Switches? lesson > TeachEngineering.org Center for Computational Neurobiology, University of Missouri.
Lego MINDSTORMS EV3.
LEGO MINDSTORMS NXT PROGRAMMING
Presentation transcript:

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

Move Block 1. 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

Move Block (cont.) 1.This icon shows that the Direction property is set to “stop”. This setting will stop all motors.

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%].

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.

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.

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.

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.

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.

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.

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.

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.

● 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.

● 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.

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.

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.

● 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.

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.

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.)

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

More on Loop Configuration

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.