44
User Manual
Copyright ©2003 A7 Engineering, Inc.
'-----[Initialization]------------------------------------------
Initialize:
'Wait for the eb500 radio to be ready
PAUSE 1000
'Set the initial state to hold
CmdData = 3
'-----[Main Code]-----------------------------------------------
Main:
'Wait for a command
SERIN
0,84,[DEC1
CmdData]
'Process
the
command
BRANCH CmdData,[Hold, Turn_Right, Turn_left, Move_Fwd]
'If the command was invalid just loop again
GOTO
Main
Move_Fwd:
PULSOUT
LMotor,LFwdFast
PULSOUT
RMotor,RFwdFast
GOTO
Main
Turn_Right:
PULSOUT
LMotor,LFwdFast
PULSOUT
RMotor,RRevFast
GOTO
Main
Turn_Left:
PULSOUT
LMotor,LRevFast
PULSOUT
RMotor,RFwdFast
GOTO
Main
Hold: