122-27400 Parallax Inc, 122-27400 Datasheet - Page 57
122-27400
Manufacturer Part Number
122-27400
Description
MANUAL FOR SUMOBOT
Manufacturer
Parallax Inc
Datasheet
1.27400.pdf
(77 pages)
Specifications of 122-27400
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
- Current page: 57 of 77
- Download datasheet (2Mb)
temp
' -----[ EEPROM Data ]-----------------------------------------------------
RunStatus
' -----[ Initialization ]--------------------------------------------------
Reset:
' Sets black threshold to 1/4 the average of the two sensor readings.
' SumoBot must be placed over black playing surface before this code runs.
Set_Threshold:
Start_Delay:
' -----[ Program Code ]----------------------------------------------------
Main:
' --[ Border Avoidance ]--
Spin_Left:
READ RunStatus, temp
temp = ~temp
WRITE RunStatus, temp
IF (temp > 0) THEN END
GOSUB Read_Line_Sensors
blackThresh = (lLine / 10) + (rLine / 10)
LOW LMotor
LOW RMotor
FOR temp = 1 TO 5
NEXT
GOTO Lunge
GOSUB Read_Line_Sensors
' If not on the Shikiri line (border), continue to look for opponent,
' otherwise, spin back toward center and resume search
BRANCH lineBits, [Search_For_Opponent, Spin_Left, Spin_Right, About_Face]
FOR pulses = 1 TO 20
HIGH StartLED
PAUSE 900
INPUT StartLED
FREQOUT Speaker, 100, 2500, 3000
PULSOUT LMotor, LRevFast
PULSOUT RMotor, RFwdFast
PAUSE 20
VAR
DATA
Byte
$00
Chapter 5: Basic Competition Code · Page 47
' run status
' read current status
' invert status
' save for next reset
' okay to run?
' set QTI black threshold
' make more pins outputs
' five second delay
' show active
' blink each second
' beep each second
' start aggressive!
' right sensor was active
Related parts for 122-27400
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
GUIDE STUDENT PROCESS CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
GUIDE STUDENT SMART SENSORS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
MANUAL PROPELLER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
LEAD WIRES FLYING CABLE III/IV
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
BOARD ADAPTER AND FLY LEADS
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
PLATFORM CABLE USB II
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
KIT STARTER COOLRUNNER-II BUNDLE
Manufacturer:
Xilinx Inc
Datasheet:
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: