27404 Parallax Inc, 27404 Datasheet - Page 158

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
Your Turn
Here is a wider variety of maneuver constants along with extra servo pulse width rotation
constants you will need to implement all 10 maneuvers.
Here is the
accommodate the
' -----[ Constants ]---------------------------------------------------
' SumoBot maneuver constants
Forward
Backward
RotateLeft
RotateRight
PivotLeft
PivotRight
CurveLeft
CurveRight
PivotLeftBack
pivotRightBack CON
' Servo pulse width rotation constants
FS_CCW
FS_CW
NO_ROT
LS_CCW
LS_CW
Save ServoControlWithLookup.bs2 as ServoControlWithLookupYourTurn.bs2.
Update the constants section with all the new declarations.
Pulse_Servos:
' Pulse to left servo
LOOKUP maneuver, [ FS_CCW, FS_CW, FS_CW, FS_CCW,
PULSOUT ServoLeft, temp
' Pulse to right servo
LOOKUP maneuver, [ FS_CW, FS_CCW, FS_CW, FS_CCW,
PULSOUT ServoRight, temp
' Pause between pulses (remove when using IR object detectors + QTIs)
PAUSE 20
RETURN
Pulse_Servos
PivotLeft
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
and
subroutine with its
NO_ROT, FS_CCW ], temp
FS_CW, NO_ROT ], temp
0
1
2
3
4
5
6
7
8
9
850
650
750
770
730
PivotRight
maneuvers:
' Forward
' Backward
' Rotate in place turning left
' Rotate in place turning right
' Pivot on 1 wheel turning left
' Pivot on 1 wheel turning right
' Curve to the left
' Curve to the right
' Pivot backward-left
' Pivot backward-right
' Full speed counterclockwise
' Full speed clockwise
' No rotation
' Low speed counterclockwise
' Low speed clockwise
LOOKUP
commands modified to

Related parts for 27404