27404 Parallax Inc, 27404 Datasheet - Page 15

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
Example Program: Forward100Pulses.bs2
' -----[ Program Description ]------------------------------------------------
' Applied Robotics with the SumoBot - Forward100Pulses.bs2
' SumoBot goes forward 100 pulses after Reset button is pressed and released.
' To repeat the forward motion, press/release the Reset button twice.
'
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]---------------------------------------------------
ServoLeft
ServoRight
' -----[ EEPROM Data ]--------------------------------------------------------
RunStatus
' -----[ Variables ]----------------------------------------------------------
temp
counter
' -----[ Initialization ]-----------------------------------------------------
DEBUG CLS
Reset_Button:
READ RunStatus, temp
temp = ~temp
WRITE RunStatus, temp
IF (temp > 0) THEN
ENDIF
DEBUG "Press/release Reset..."
END
Repeat five to ten times to be sure which SumoBot's plow adjustment has the
advantage.
Adjust the plow of the SumoBot that appeared to lose more often, and repeat the
test.
When you are confident that one of your SumoBots has a winning plow
adjustment, try lots of different adjustments on the other SumoBot to find out if
there is any better adjustment that can make it the winner.
When you are satisfied with your winning SumoBot's plow, leave its adjustment
as-is, and tune the other SumoBot's plow until its chances of winning/losing are
close to even.
PIN
PIN
DATA
VAR
VAR
13
12
0
Byte
Byte
Chapter 1: Mechanical Adjustments · Page 11
' Left servo connected to P13
' Right servo connected to P12
' Start with program not running
' Temporary variable
' FOR...NEXT loop counter
' Clear the Debug Terminal
' read current status
' invert status
' save for next reset
' 0 -> End, 1 -> Main routine

Related parts for 27404