© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Sentry System Two-Way Communication.

Slides:



Advertisements
Similar presentations
EducateNXT Follow the Leader Using Bluetooth communication, one robot can be made to follow the actions of a second robot. Features in this presentation:
Advertisements

Jason Howard. Agenda I. How to download robotc II. What is tele-op used for? III. How to build a basic tele-op program IV. Getting the robot to drive.
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Tree Surveying Existing Design.
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Mine Mapping Remote Communication.
Robot Soccer Challenge
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Automated Mining Project.
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Mine Mapping Choose a Sensor.
Vex Robotics Introduction to Sensors. introduction to sensors Sensors assist robots in seeing and feeling the physical world through which they travel.
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Guard Robot Project.
RobotC Programming for LEGO Mindstorms NXT Carnegie Mellon Dacta Lego Timothy Friez Miha Štajdohar SOURCES:
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Sentry System One-Way Communication.
Introduction to NXT Software and Functionality Bot’oberfest October 15, 2007.
Reviewing Common Blocks for St. Agnes Elementary School Teachers by Jenny Chang Feb. 26th, 2007 USC & University Neighborhood Outreach Robotics STEM program.
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.
Testbed: Exercises.
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.
Robotics Catchup/Review: switch, arithmetic, range, loop Bluetooth Lab: Finish parallel parking. Next: Use Bluetooth communication for calculate & send.
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Tree Measurer Project.
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Mine Mapping Scanning and.
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.
Unit 5 – “Watch Out!”. Introduction New Topics Case Structures New Functions Less? Comparison Function Ultrasonic Sensor.
Looping forever Reading/observing sensors (inputs) Reacting to sensors Obstacle sensors.
Coding for the FIRST Tech Challenge: RobotC
Bluetooth Communication Module 3. Warm Up SWQ: 30 – Oct. – 2013 Give examples where Bluetooth technology is used What is the range for the Bluetooth ?
Sentry System Multiple Sensors
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.
While and If-Else Loops ROBOTC Software. While Loops While loop is a structure within ROBOTC Allows a section of code to be repeated as long as a certain.
Programming 101 The Common Palette Content provided by Connor Statham (9 th Grade Student) Formatting by Shannon Sieber.
Mindstorm NXT-G Introduction Towson University Robotics.
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 Integration.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
After Construction Name: Per #:.
Introduction to LEGO Mindstorms EV3 What is in the box?
Development Environment
Using the Lego Mindstorms Edu NXT Software
Scratch for Interactivity
Java on the LEGO Mindstorms EV3
Introduction To Programming with LEGO NXT 2
Introduction To Flowcharting
Robot Soccer Challenge
fischertechnik® RoboPro Software for Gateway To Technology® RoboPro
Loops and Switches Pre-Quiz
Music by Touch Music by Touch Presentation > TeachEngineering.org
Module F: Presentation Understanding Robot Fundamentals
Displaying sensor values while a robot is running
While Loops and If-Else Structures
Sensors and Logic Switches
Exploring Computer Science Lesson 6-5
Controlling your quadcopter
An Introduction to VEX IQ Programming with Modkit
Holyoke Codes LEGO ROBOTICS
Storing Values as Variables
While Loops and If-Else Structures
While Loops and If-Else Structures
While Loops and If-Else Structures
While Loops and If-Else Structures
if-else Structures Principles of Engineering
While Loops and If-Else Structures
RobotC Programming for LEGO Mindstorms NXT
Loops and Switches How Do You Make Loops and Switches? lesson > TeachEngineering.org Center for Computational Neurobiology, University of Missouri.
While Loops and If-Else Structures
Creating a Simple Game in Scratch
While Loops And If-Else Structures
Downloading to the NXT requires the correct hardware setup
Controlling your quadcopter
LEGO MINDSTORMS NXT PROGRAMMING
Presentation transcript:

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Sentry System Two-Way Communication See Teacher Guide for printing instructions

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Opening Activity List 10 different forms of communication, and determine whether they are one-way or two-way in nature. Example: Television is one-way, because the signal only travels from the station to your TV; you can’t send signals back to the TV station

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Opening Activity Public speech (one-way) Pager (one-way) Radio broadcast (one-way) PA system (one-way) Remote control (one-way) Siren (one-way) Computer monitor (one-way) Print media (one-way) Website (one-way) List 10 different forms of communication, and determine whether they are one-way or two-way in nature. Conversation (two-way) Telephone (two-way) Text messaging/IM (two-way) Postal mail (slow two-way) (slow two-way) Touchscreen monitor (two-way) Message board (two-way) Sign language (two-way) Weblog/Blog (two-way)

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Opening Activity One-way communication (sentry to monitor station) OR Two-way communication (sentry to sentry) A critical decision: Will your sentry system use…

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 One-Way Communication Advantages –Dedicated functionality of sentry vs. monitor station –Simpler programming –No need to add sensors to the Monitor NXT Disadvantages –Only half as many robots actually watching the assigned area –System more dependent on human assistance Sentry and Monitor In the One-Way Communication system, the sentry watches and the monitor alerts a human guard if the sentry spots anything

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Two-Way Communication Advantages –Two sentries can cover more area –Possibilities for coordinated response to complex threats Disadvantages –No immediate feedback given to human guard (would take a third NXT) –More complex reactions require more complex programming Dual Sentry System In the Two-Way Communication system, two robotic sentries communicate directly with each other to watch for and respond to any problems detected

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 One-Way or Two-Way? Make your decision now with your group

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Investigation Path (b) This version of Investigation 2 is for groups that have chosen a Two-Way Communication Sentry System Groups that chose a One-Way system should use Investigation 2a instead

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Logistics You will pair with another group for this Engineering Project Both groups will develop their own sentries The two sentries must communicate The two groups will remain separate, but plan and coordinate communication issues Two of a… Kind Of The two robots in the system will function both independently and in conjunction with each other

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Two-way Communication: Technical Review Data Hubs & Wires Bluetooth Send & Receive Value Switch Non-Flat View Switches “Message Received” and Empty Mailboxes Loops

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Data Hubs & Wires Many blocks have data hubs which can be opened by clicking the notch in the lower-left corner of the block. A data hub contains many data plugs, which allow information to flow in and out of the block. Data wires control the flow of data between blocks. Output plugs typically send out a sensor value, or the result of a computation. Such information usually goes into another block’s input plug, allowing the reading or result to be used as a value inside the block. Speed Controlled by Sensor Ultrasonic Sensor distance output plug controls the value of the Move Block’s power setting

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Bluetooth: Send Message The Send Message and Receive Message blocks work together to allow information to get from one NXT to another. Using Bluetooth in a program requires two NXTs connected in advance. The Send Message block is used to send data from the NXT where it is run, over a specified Connection Number, and places it in a mailbox (also specified in the Send block) on the destination NXT. Send Ultrasonic Sensor Value The Ultrasonic sensor value is read (once) and sent into Mailbox 1 on the NXT on the other end of Connection Number 1. We assume the Connection has been set up before running. More information about Bluetooth Messages can be found in Advanced > Bluetooth > Sending and Receiving Messages

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Bluetooth: Receive Message The Send Message and Receive Message blocks work together to allow information to get from one NXT to another. Using Bluetooth in a program requires two NXTs connected in advance. The Receive Message block retrieves a message from a specified mailbox. This also removes the message from the mailbox. Receive and Display Wait 3 seconds to give time for a message to arrive, then display the value of the Number message in Mailbox 1 on the NXT’s view screen for 5 seconds More information about Bluetooth Messages can be found in Advanced > Bluetooth > Sending and Receiving Messages

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Switch Block: Flat View Switch blocks allow the program to observe a value, and choose between different paths of code to follow, based on the observed value. Most Switch blocks use a simple two- possibility approach to decision making, but some situations require the Switch to be able to discern more than two possibilities. Unchecking the Flat View box in the configuration panel allows you to add and check additional possibilities for Number and Text Value Switches. The tabs at the top represent the areas that were previously top and bottom, as well as any additional options. The World is Flat Flat View (top) shows two possible paths at once, while Tabbed View (bottom) shows only one at a time. The other code paths are accessible by clicking on the other tabs.

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Switch Block: Logic Value Switch blocks allow the program to observe a value, and choose between different paths of code to follow, based on the observed value. Value Switch Blocks expose a data input plug, which must be wired to an appropriate source in the program. The input from this plug will be used to decide which group of blocks to run. Logic Value Switch Blocks use a Logic value to decide which blocks to run. A True value will run the top branch, while a False value will run the bottom branch. Sight or Sound Based on the value of the Logic value coming through the green wire, this Switch will either play a sound (if the value is True), or show a picture (if the value is False)

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Switch Block: Number Value Switch blocks allow the program to observe a value, and choose between different paths of code to follow, based on the observed value. Value Switch Blocks expose a data input plug, which must be wired to an appropriate source in the program. The input from this plug will be used to decide which group of blocks to run. Number Value Switch Blocks use a Number value to decide which blocks to run. Numbers are specified in the configuration panel, and the input number is checked against them. An exact match will run the appropriate branch. Normally, this type of switch is used with Flat View turned off. Three Way Intersection Based on the value of the Logic value coming through the green wire, this Switch will run in a different direction. The action corresponding to a number input of 3 is shown.

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Message Received Bluetooth messages are removed from their mailboxes when a Receive Message block or switch accesses them. Repeated access of a mailbox can cause problems if a Receive block tries to read from a mailbox that has no messages in it. The Message Received data plug on the Receive Message block allows a program to first see whether a message was present before attempting to use data from inside it. Knock Before Entering Instead of blindly assuming that a message was successfully retrieved, this program first checks the Message Received data plug to make sure

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Infinite Loop The Loop Block runs the blocks inside it over and over again, until a certain stopping condition is met. The infinite loop or “forever” loop has no stopping condition, and therefore will repeat the blocks inside over and over, forever. Back and Forth The loop causes the robot to repeat the forward-then-back motion forever

© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 One important choice in your system design will be whether to use a Sentry + Monitor system, or two sentries Follow the (b) path investigations in this project if you have chosen to have two active sentries in your system Summary You must connect two NXTs using the Bluetooth menus before you can use Send and Receive blocks in your programs Both sentries will run programs with both Send Message and Receive Message blocks to check the data See the Advanced > Bluetooth section for more information Extra caution must be taken not to accidentally try to read from an empty mailbox