EmbeddedBlue 500
43
Copyright ©2003 A7 Engineering, Inc.
RETURN
BadCommand:
DEBUG "A bad command was received."
END
ErrorCode:
bErrorCode
=
bBuffer(4)
DEBUG "An error was received: ",STR bErrorCode,CR
END
3.
On the
File
menu, click
Save As
.
4.
In the
File name
box, enter a file name to which to save the program just created.
For example, MonkeySee.bs2.
5.
Click
Save
.
Step 2: Create a Monkey-Do Application for the Boe-Bot
In this step we will create a BASIC Stamp application that will receive information
from the remote SumoBot and perform movements based on that information.
1.
On the
File
menu, click
New
.
This will create a new project window within the BASIC Stamp Editor.
2.
Enter the following
program code
into the editor.
'{$STAMP BS2}
'-----[I/O Definitions]-----------------------------------------
LMotor
CON
15
RMotor
CON
14
'-----[Constants]-----------------------------------------------
LFwdFast CON
1000
LRevFast CON
500
RFwdFast CON
500
RRevFast CON
1000
'-----[Variables]-----------------------------------------------
CmdData VAR
BYTE