27403 Parallax Inc, 27403 Datasheet - Page 157

GUIDE APP ROBOTCS W/SUMOBOT V1.0

27403

Manufacturer Part Number
27403
Description
GUIDE APP ROBOTCS W/SUMOBOT V1.0
Manufacturer
Parallax Inc
Datasheet

Specifications of 27403

Accessory Type
Manual
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 27403