EmbeddedBlue 500
21
Copyright ©2003 A7 Engineering, Inc.
Establishing a Connection
This section contains a number of exercises that demonstrate methods of establishing
Bluetooth wireless connections with the eb500. The scenarios described are not meant to
form an exhaustive list, but rather illustrate a number of more common and useful
configurations. All source code shown in these exercises is available in electronic form on
the accompanying CD, in the Samples folder, using the filename used in this manual.
Connecting two eb500 Modules
In this exercise we will step through the process of establishing a connection between an
eb500 inserted into a Board of Education board and an eb500 inserted into a SumoBoard
board.
To perform this exercise, as documented, you will need a Board of Education board, a
SumoBoard board, and two eb500 modules. If you are using any of the other supported
Parallax boards, you may need to make adjustments to this exercise.
Step 1: Write a BASIC Stamp Application to Get the eb500 Address
In this step we will write a BASIC Stamp application to interrogate an eb500 for its
unique Bluetooth address.
1.
Open the
Basic Stamp Editor
.
2.
Enter the following
program code
into the editor.
'{$STAMP BS2}
szData VAR BYTE(20)
'Wait for the eb500 radio to be ready
PAUSE 1000
'Get the eb500 Bluetooth Address
SEROUT 1,84,["get addr",CR]
SERIN 0,84,[WAIT(“ACK”,CR)]