48
User Manual
Copyright ©2003 A7 Engineering, Inc.
3.
Using HyperTerminal, acquire the
device address
of the
eb500
connected to the
eb600 PC Adapter by using the eb500 GET ADDR serial command.
Please note the device address as it will be used in the BASIC Stamp application
developed in the following actions.
By issuing the GET ADDR command, the eb500 connected to the eb600 will return
its own device address.
To obtain the device address, type
get addr
at the “
>
” prompt and press the return
key.
Example:
>get addr
ACK
00:0C:84:00:07:D8
>
4.
Using the BASIC Stamp Editor, on the
File
menu, click
New
.
This will create a new project window within the BASIC Stamp Editor.
5.
Enter the following
program code
into the editor, replacing the device address with
the device address obtained from the GET ADDR command issued above.
‘{$STAMP BS2}
nCount VAR BYTE
‘I/O Line 5 provides the connection status
INPUT 5
‘Wait for the eb500 radio to be ready
PAUSE 1000
‘Connect to the remote device
SEROUT 1,84,[“con 00:0C:84:00:07:D8”,CR]
SERIN 0,84,[WAIT(“ACK”,CR)]
WaitForConnection:
IF in5 = 0 THEN WaitForConnection
DEBUG “Connected”,CR
FOR nCount = 1 to 10
SEROUT 1,84,[“Hello World”,CR]
‘sending data
PAUSE
1000
‘wait
for
1
second
NEXT
‘I/O Line 6 allows us to switch to command mode.