27403 Parallax Inc, 27403 Datasheet - Page 154

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
A Servo Control Subroutine with the LOOKUP Command
In addition to the
a nibble variable named
The
control subroutine.
For example, you can set
subroutine like this:
If you want to deliver 35 pulses, put it in a
maneuver
Save the example program as LookupExampleYourTurn.bs2
Add these constant declarations with the
C_6 CON 1046
D_6 CON 1175
E_6 CON 1319
F_6 CON 1397
G_6 CON 1580
A_6 CON 1760
B_6 CON 1976
C_7 CON 2093
Change the lookup table to this:
Run the program, and verify that it works the same as before.
maneuver
Forward
Backward
RotateLeft
RotateRight
maneuver = Forward
GOSUB Pulse_Servos
FOR counter = 1 TO 35
NEXT
LOOKUP counter, [C_6, D_6, E_6,
maneuver = Forward
GOSUB Pulse_Servos
variable will be set equal to various constants before calling a servo
counter
maneuver
CON
CON
CON
CON
VAR
maneuver
and
F_6, G_6, A_6,
B_6, C_7], note
temp
:
0
1
2
3
Nib
variables, this activity's example program will use
equal to a value and then call the servo control
FOR...NEXT
CON
' SumoBot travel maneuver
' Forward
' Backward
' RotateLeft
' RotateRight
' Forward 35 pulses
directive:
loop:

Related parts for 27403