EmbeddedBlue 500
11
Copyright ©2003 A7 Engineering, Inc.
SEROUT 1,84,["+++"]
SERIN 0,84,[WAIT(CR,">")]
DEBUG "In Command Mode",CR
'Disconnect from remote device
SEROUT 1,84,["dis",CR]
SERIN 0,84,[WAIT(CR,">")]
DEBUG "Disconnected",CR
The following BASIC Stamp application uses the mode control I/O line of the eb500 module
to switch between data mode and command mode. Switching between data mode and
command mode via the mode control I/O line is preferred, as it is faster than the serial
method. This application is available in electronic form on the accompanying CD in the
Samples folder in the file CmdModeHard.bs2.
'{$STAMP BS2}
szData VAR BYTE(20)
'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
SEROUT 1,84,["This text is sent in data mode",CR]
'I/O Line 6 allows us to switch to Command Mode
OUTPUT 6
'Switch to Command Mode
LOW 6
SERIN 0,84,[WAIT(CR,">")]
DEBUG "In Command Mode",CR