EmbeddedBlue 500
57
Copyright ©2003 A7 Engineering, Inc.
Communicating between an iPAQ h1940 an a BOE
In this exercise we will step through the process of communicating between an iPAQ h1940,
which has integrated Bluetooth, and an eb500 module inserted into a Board of Education
board.
To perform this exercise, as documented, you will need an iPAQ h1940, a Board of
Education board, and an eb500 module. If you are using a different model of Pocket PC,
with integrated Bluetooth, or any of the other supported Parallax boards, you may need to
make adjustments to this exercise.
Step 1: Transmit Data from the iPAQ 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. The application for the iPAQ is too verbose to
include in this manual; therefore, the application, along with the source code, is
available on the accompanying CD in the Samples folder. To modify the Pocket PC
application you will need eMbedded Visual C++ 4.0 with Service Pack 2 and the SDK
for Windows Mobile
™
2003-based Pocket PCs.
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}
szData VAR BYTE(20)
‘Wait for the eb500 radio to be ready
PAUSE 1000
Main:
SERIN
0,84,[STR
szData\20\CR]
DEBUG STR szData,CR
GOTO
Main
4.
On the
File
menu, click
Save As
.
5.
In the
File name
box, enter a file name to which to save the program just created.
For example, ReceivePPC.bs2.
6.
Click
Save
.
7.
Apply
power
to the
Board of Education board
.