27404 Parallax Inc, 27404 Datasheet - Page 157

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
NO_ROT
' -----[ Variables ]----------------------------------------------------------
temp
counter
maneuver
' -----[ Main Routine ]-------------------------------------------------------
Test_Search_Pattern:
' -----[ Subroutine - Pulse_Servos ]------------------------------------------
Pulse_Servos:
DO
LOOP
' Pulse to left servo
LOOKUP maneuver, [FS_CCW, FS_CW, FS_CW, FS_CCW], temp
PULSOUT ServoLeft, temp
' Pulse to right servo
LOOKUP maneuver, [FS_CW, FS_CCW, FS_CW, FS_CCW], temp
PULSOUT ServoRight, temp
' Pause between pulses (remove when using IR object detectors + QTIs).
PAUSE 20
RETURN
FOR counter = 1 TO 35
NEXT
FOR counter = 1 TO 12
NEXT
FOR counter = 1 TO 24
NEXT
FOR counter = 1 TO 12
NEXT
maneuver = Forward
GOSUB Pulse_Servos
maneuver = RotateLeft
GOSUB Pulse_Servos
maneuver = RotateRight
GOSUB Pulse_Servos
maneuver = RotateLeft
GOSUB Pulse_Servos
CON
VAR
VAR
VAR
750
Word
Byte
Nib
' No rotation
' Temporary variable
' Loop counting variable.
' SumoBot travel maneuver
' Forward 35 pulses
' Rotate left 12 pulses
' Rotate right 24 pulses
' Rotate Left 12 pulses

Related parts for 27404