27404 Parallax Inc, 27404 Datasheet - Page 178

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
LOOP
Software that is used for designing and modeling state machines that go into automated
machinery and/or integrated circuits have various ways of both simplifying state
diagrams and at the same time making them more versatile. One of the techniques is
assigning priority to various conditions for transition from one state to another. That
way, the programmer (or the software that writes the program from the hybrid state
diagram) can decide in what order to examine each condition. It also simplifies the
conditions and reduces the number of transitions. Another common technique is to have
a node in the transition line that can branch to multiple states depending on multiple
conditions – “conditional branch.”
Figure 4-11 shows an example of a hybrid state diagram that describes the
FrontIrNavigation.bs2's Main Routine. The "Next State" state is unconventional, as are
the numbers inside the Next State circle that show what order it evaluates the conditions
for transition. Even so, the figure describes what's happening in the main routine much
more succinctly than a normal state diagram.
ELSEIF irRF = 1 THEN
ELSE
ENDIF
LOOP
counter = 0
DO UNTIL (irLF = AND irRF = 1) OR counter > 15
LOOP
GOSUB Read_Object_Detectors
maneuver = PivotRight
GOSUB Servos_And_Sensors
counter = counter + 1
' Just right?
' State=track front right object
' Pivot right 15
' No objects detected?
' State = search pattern

Related parts for 27404