27404 Parallax Inc, 27404 Datasheet - Page 222

COMPETITION RING FOR SUMOBOT

27404

Manufacturer Part Number
27404
Description
COMPETITION RING FOR SUMOBOT
Manufacturer
Parallax Inc
Datasheet

Specifications of 27404

Accessory Type
Hobby and Education
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
SumoBot®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
' -----[ Variables ]----------------------------------------------------------
#IF DEBUG_MODE = 1 #THEN
#ENDIF
All the
is added to the Initialization section.
' -----[ Initialization ]-----------------------------------------------------
#IF DEBUG_MODE = 1 #THEN
#ENDIF
Since all roads lead to the
to put some code for displaying what's happening inside the program. In this example,
the command
Remember, the subroutine call only becomes part of the program when
' -----[ Subroutine - Servos_And_Sensors ]------------------------------------
Servos_And_Sensors:
Since each subroutine represents a different operating 'state' for the SumoBot, code has to
be added to the beginning of each one to set the value of the
some examples.
' -----[ Subroutine - Avoid_Tawara_Left ]-------------------------------------
Avoid_Tawara_Left:
state
DEBUG CLS,
#IF DEBUG_MODE = 1 #THEN
#ENDIF
#IF DEBUG_MODE = 1 #THEN state = ATL #ENDIF
.
.
.
.
.
.
.
.
.
.
GOSUB Display_All
sensor
"Sensors
"--------
GOSUB Display_All
,
state
VAR
State
--------
, and
Nib
Servos_And_Sensors
maneuver
Maneuver", CR,
--------", CR
has been placed at the beginning of the subroutine.
values are displayed in a table, so a table heading
subroutine, that's the most logical place
' State machine value
' Display table heading
' Call Display_All subroutine
state
variable. Here are
DEBUG_MODE = 1
.

Related parts for 27404