EmbeddedBlue 500
49
Copyright ©2003 A7 Engineering, Inc.
OUTPUT 6
‘Switch to Command Mode
LOW 6
SERIN 0,84,[WAIT(CR,”>”)]
‘Disconnect from the remote device
SEROUT 1,84,[“dis”,CR]
SERIN 0,84,[wait(CR,”>”)]
DEBUG “Disconnected”,CR
The application establishes a connection with the remote eb500 device, transmits
“Hello World” ten times, switches back to command mode and then disconnects from
the remote device.
The first call to SEROUT is used when the eb500 is in command mode and instructs
the eb500 to establish a connection with the device specified. Once a connection is
established the eb500 is in data mode, which causes further calls to SEROUT to be
sent to the remote device.
6.
On the
File
menu, click
Save As
.
This will display the Save As dialog.
7.
In the
File name
box, enter a file name to which to save the program just created.
For example, HelloWorld.bs2.
8.
Click
Save
.
9.
On the
Run
menu, click
Run
.
This will display the Download Program dialog while downloading the program to the
BASIC Stamp. After the download is complete the BASIC Stamp application will
transmit “Hello World” over the wireless link, and HyperTerminal will display the
received data (Figure 11).