Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Sentry System One-Way Communication."— Presentation transcript:

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

2 © 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

3 © 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) E-mail (slow two-way) Touchscreen monitor (two-way) Message board (two-way) Sign language (two-way) Weblog/Blog (two-way)

4 © 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…

5 © 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

6 © 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

7 © 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

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

9 © 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 One group’s NXT will become the Sentry The other NXT will become the Monitor All members of both groups will work together as one large group NXTeamwork Since the two pieces in a One-Way system are not the same, they will be treated as two parts of the same system and worked on together

10 © 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 One-Way Communication: Technical Review Data Hubs & Wires Bluetooth Send Bluetooth Switch Bluetooth Mailboxes Loops

11 © 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

12 © 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

13 © 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Bluetooth: Receive Message Switch The Receive Message Switch is both a Receive Message block and a Switch block. Using Bluetooth in a program requires two NXTs connected in advance. Switch Blocks… allow the program to observe a value, and choose between different paths of code to follow, based on the observed value. Receive Message Switch Blocks… check a Bluetooth message to determine which group of blocks to run. Doing so removes the message from the mailbox. The message value is compared against a value specified in the block’s configuration panel. If the value matches, the top (check) branch is run. If it does not match, the bottom (X) branch runs instead. Are You the 1? Wait 3 seconds to give time for a message to arrive, then check whether a Number value of 1 has arrived in Mailbox 1. If it has, display a smiley face on the NXT’s view screen for 5 seconds More information about Bluetooth Messages can be found in Advanced > Bluetooth > Sending and Receiving Messages

14 © 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Bluetooth: Mailboxes Mailboxes are drop-off points for Bluetooth messages arriving on a receiving NXT. The Send Message block specifies which mailbox the message will go into when it reaches the remote NXT. The Receive Message block specifies a mailbox to retrieve a message from. Each mailbox stores up to 5 messages in the order they were received. Mailboxes should not be confused with Connection Numbers. Connection Numbers specify which Bluetooth link to send data over, while Mailboxes represent different holding areas for data once it has arrived. More information about Bluetooth Messages can be found in Advanced > Bluetooth > Sending and Receiving Messages Bluetooth Schematic Connections are shown as blue tubes and nodes. Data travels through the connection and into a specified Mailbox (red) on the destination NXT

15 © 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

16 © 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 (a) path investigations in this project if you have chosen to have one sentry and one monitor in your system Summary You must connect two NXTs using the Bluetooth menus before you can use Send and Receive blocks in your programs The Sentry will run a program with a Send Message block, then the Monitor will use a Receive Message switch to check the data See the Advanced > Bluetooth section for more information


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

Similar presentations


Ads by Google