27404 Parallax Inc, 27404 Datasheet - Page 23

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
' -----[ Program Description ]------------------------------------------------
' Applied Robotics with the SumoBot - ForwardLowTimeTest.bs2
' SumoBot goes forward indefinitely.
' the forward motion.
'
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]---------------------------------------------------
ServoLeft
ServoRight
' -----[ EEPROM Data ]--------------------------------------------------------
RunStatus
' -----[ Constants ]----------------------------------------------------------
LowTime
' -----[ Variables ]----------------------------------------------------------
temp
counter
' -----[ Initialization ]-----------------------------------------------------
DEBUG CLS
READ RunStatus, temp
temp = ~temp
WRITE RunStatus, temp
IF (temp > 0) THEN
ENDIF
DEBUG "Main program running...", CR
' -----[ Main Routine ]-------------------------------------------------------
DO
DEBUG "Press/release Reset..."
END
PULSOUT ServoLeft,
PULSOUT ServoRight, 650
PAUSE LowTime
Compare the results of the two trials and determine which program gives the
SumoBot better performance.
PIN
PIN
DATA
CON
VAR
VAR
850
13
12
0
20
Byte
Byte
Use the Reset button to start and stop
Chapter 1: Mechanical Adjustments · Page 19
' Left servo connected to P13
' Right servo connected to P12
' Start with program not running
' Try 1 SumoBot with 20 ms pulses
' Try the other with 40 ms pulses
' Temporary variable
' FOR...NEXT loop counter
' Clear the Debug Terminal
' read current status
' invert status
' save for next reset
' 0 -> End, 1 -> Main routine
' Display program status
' Forward pulses indefinitely

Related parts for 27404