EmbeddedBlue 500
51
Copyright ©2003 A7 Engineering, Inc.
Communicating between a PC with a DBT-120 and a BOE
In this exercise we will step through the process of communicating between a PC that has a
D-Link® DBT-120 Bluetooth USP Adapter and an eb500 module inserted into a Board of
Education board.
To perform this exercise, as documented, you will need a D-Link DBT-120, a Board of
Education board, and an eb500 module. If you are using any of the other supported Parallax
boards, you may need to make adjustments to this exercise.
On the PC, the DBT-120 Bluetooth Software associates a COM port for establishing a
connection from the PC to a remote Bluetooth device and a separate COM port for
connections that are established from a remote Bluetooth device to the PC. Step 1 of this
exercise demonstrates establishing a connection from the PC to the eb500 on the Board of
Education and then transmitting data over the connection. Step 2 of this exercise
demonstrates establishing a connection from the eb500 on the Board of Education to the PC
and then transmitting data over the connection.
The D-Link DBT-120 Bluetooth USB Adapter software must be fully installed prior to
establishing a connection. The PC settings shown in this exercise are based upon the
software provided with the D-Link DBT-120 Bluetooth USB Adapter.
Step 1: Transmit Data from the PC to the BASIC Stamp
In this step we will create a BASIC Stamp application to read data from the eb500
and display the data in the BASIC Stamp Editor Debug window. We will then
download and run the application.
1.
Connect the
Board of Education board serial port
to the
PC
.
2.
Open the
BASIC Stamp Editor
.
3.
Enter the following
program code
into the editor.
‘{$STAMP BS2}
bData VAR BYTE
‘Wait for the eb500 radio to be ready
PAUSE 1000
Main:
SERIN 0,84,[STR bData\1]
DEBUG STR bData\1
GOTO
Main
The application waits for an individual byte of data to arrive and then displays the
byte in the debug window and then repeats this process.
4.
On the
File
menu, click
Save As
.