27403 Parallax Inc, 27403 Datasheet - Page 230

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
' -----[ Subroutine - Calibrate_Qtis ]----------------------------------------
Calibrate_Qtis:
' -----[ Subroutine - Servos_And_Sensors ]------------------------------------
Servos_And_Sensors:
RETURN
HIGH qtiPwrLeft
HIGH qtiSigLeft
PAUSE 1
RCTIME qtiSigLeft, 1, temp
LOW qtiPwrLeft
multi = temp
HIGH qtiPwrRight
HIGH qtiSigRight
PAUSE 1
RCTIME qtiSigRight, 1, temp
multi = (multi + temp) / 2
multi = multi / 4
IF multi > 220 THEN
ELSE
ENDIF
WRITE QtiThresh, Word multi
RETURN
#IF DEBUG_MODE = 1 #THEN
#ENDIF
GOSUB Pulse_Servos
' Call sensor subroutine(s).
sensors = 0
GOSUB Read_Object_Detectors
GOSUB Read_Line_Sensors
multi = multi - 220
multi = 0
GOSUB Display_All
' Turn left QTI on
' Discharge capacitor
' Measure charge time
' Turn left QTI off
' Free temp for another RCTIME
' Turn right QTI on
' Discharge capacitor
' Measure charge time
' Calculate average
' Take 1/4 average
' Account for code overhead
' Threshold to EEPROM
' Call Display_All subroutine
' Call Pulse_Servos subroutine
' Clear previous sensor values
' Call Read_Object_Detectors
' Look for lines

Related parts for 27403