Text Message

ACTIVITY HEADER

 

 

 

Name of Activity

Text Message

Author

STOMP

Keywords

bluetooth, connection, NXT, 1 Hour Total, text message

Subject

NXTs

Grade Level

4, 5, 6, 7, 8, 9+

Time

1 Hour Total

Brief Description

Students will establish a Bluetooth connection between 2 NXTs and use one to send a text message to the other.

Lesson Objectives:

- To learn how to use and program a Bluetooth.

- To learn to use the NXT display feature.

Materials Needed:

- 2 NXTs per group.

- Computers running NXT software.

Preparation and Set Up:

Set up computers running NXT software.

Arrange students in groups of two.

Distribute the necessary materials.

Procedure

  1. Turn the Bluetooth feature on for both NXTs:
    1. ON the NXT’s Menu, scroll over to the BLUETOOTH using the light grey arrows.
    2. Select BLUETOOTH by pushing teh orange button.
    3. Scroll over to ON/OFF.
    4. Select ON/OFF.
    5. Turn the NXT ON. When you select ON, a little Bluetooth symbol will appear in the upper left-hand corner of the screen.

  • Rename the NXTs so that they can easily identify one another.
    1. In NXT software, select the NXT WINDOW icon in your bottom right corner control panel.
    2. Select your NXT under your COMMUNICATION tab.
    3. In the right corner is a box to rename your NXT. Click the bottom to the right when done.

  • Choose one NXT to be the sender and one to receive the text message. The sender will need to establish a connection with the receiver NXT.
  • Establish a connection between the NXTs by:
    1. Return to the BLUETOOTH option on the NXT menu.
    2. Scroll over to SEARCH on the sender NXT.
    3. Select SEARCH and choose your receiver NXT (look for the name). This only needs to be done with one of the NXTs.
    4. You will then be prompted to choose a slot (the NXT can be connected to 4 devices at a time).
    5. If done correctly, each NXT will beep and should be prompted to enter a passkey. The passkey is 1234 and should be automatically entered on the screen.
    6. Select the checkmark on both NXTs to establish a connection. Connection can be verified by looking up in the top left corner. If the Bluetooth symbol only has a < sign next to it, no connection has been made. If it has <> then a connection is made.
    7. After you establish a connection you will be able to see the connection under BLUETOOTH:CONNECTIONS Both NXTs will show the other.

  • Write a program for the NXT to send a message:
    1. First use a TEXT block to type the message you wish to be displayed on your other NXT.
    2. Then add a SEND MESSAGE via Bluetooth block. Select the connection number you previously designated when establishing a Bluetooth connection between your NXTs. Also select the type of data being sent. In this case Text.
    3. Bring down the dropdown menus for both blocks (by clicking on the line at the bottom of the block) and wire the Text output of the TEXT block to the Text input of the SEND MESSAGE block.

  • On the other NXT, write a program to receive the text message.
    1. Use a RECEIVE MESSAGE via Bluetooth block to monitor for an incoming message. Place this block within a LOOP block so that it continually monitors for the incoming message.Be sure to set the RECEIVE MESSAGE block to receive Text and to set the LOOP to continue until True.
    2. Bring down the dropdown menu for the RECEIVE MESSAGE block and wire the Bluetooth In output to the True/False Input of the LOOP. This will force th program to loop until a message is received.
    3. Then add a DISPLAY block so that the message received will appear on the NXT screen. Set the display to appear as Text.
    4. Bring down the dropdown menu for the DISPLAY block and wire the Text output of the RECEIVE MESSAGE block to the Text In input of the DISPLAY block.
    5. Finally, add a WAIT FOR TIME block so that the message will appear on the screen for a period of time and then disappear to allow the program to run again.

    Extensions:

    Page 1 of 2 | Next page