27404 Parallax Inc, 27404 Datasheet - Page 175

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
state machines". However, the term "state machine" is commonly used to refer to finite
state machines.
Your SumoBot is without a doubt, a state machine. The last couple of example programs
have used terms like "State = search pattern" and "State = track front left object" in the
comments. The IR object detectors sense conditions, and the SumoBot's embedded
BASIC Stamp executes a program that interprets each new condition and makes the
transition to the correct state. Of course, the SumoBot reads the sensors and transitions
between states because the PBASIC program it runs makes it do that.
This activity examines how PBASIC code can make the SumoBot transition from one
state to the next based on sensor input. This activity also introduces a visual aid for
planning the SumoBot's states and transitions - the state diagram.
A Simple State Diagram and Program
Figure 4-9 shows an example of a simple state diagram. Each circle signifies a state that
the SumoBot can operate in. Both states are labeled,
arrows curve around and point back to the same state while other arrows point to the
other state. These arrows represent state transitions. Each state transition arrow is
labeled with a condition, like
arrow with the jagged shaft labeled
LED Off
The curved arrow that keeps returning to the
that so long as
the LED off state. The arrow that points from
condition is
Blink LED
state.
state. The
pbSesne = 1
pbSense
Blink LED
stores zero, the state machine will just keep transitioning back to
, the state machine will transition from the
pbSense = 0
state also has two transition arrows, one that keeps it in
Reset
, and it indicates that this system will start in the
or
LED off
LED Off
pbSense = 1
LED Off
state labeled
to
Blink LED
Figure 4-9
Simple State
Machine Diagram
. The reset condition is the
and
Blink LED
pbSense = 0
shows that when the
LED off
. Some of the
state to the
indicates

Related parts for 27404