122-27400 Parallax Inc, 122-27400 Datasheet - Page 37
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: 37 of 77
- Download datasheet (2Mb)
lbLeft
lbRight
' -----[ Program Code ]----------------------------------------------------
Main:
' -----[ Subroutines ]-----------------------------------------------------
Read_Line_Sensors:
HOW IT WORKS
This program takes the working QTI code and incorporates into a unified subroutine.
The end of the subroutine converts the analog values from the QTI sensors to a single
nibble value that contains the status of both sensors. Incorporating both sensor readings
into a single variable streamlines the SumoBot robot's border avoidance logic.
GOSUB Read_Line_Sensors
DEBUG HOME, "LR", CR,
SELECT lineBits
ENDSELECT
GOTO Main
END
HIGH LLinePwr
HIGH RLinePwr
HIGH LLineIn
HIGH RLineIn
PAUSE 1
RCTIME LLineIn, 1, lLine
RCTIME RLineIn, 1, rLine
LOW LLinePwr
LOW RLinePwr
' convert readings to bits
LOOKDOWN lLine, >=[1000, 0], lbLeft
LOOKDOWN rLine, >=[1000, 0], lbRight
RETURN
CASE %00
CASE %01
CASE %10
CASE %11
DEBUG "Continue forward", CLREOL
DEBUG "Spin Left", CLREOL
DEBUG "Spin Right", CLREOL
DEBUG "Back up and turn around", CLREOL
BIN2 lineBits, CR, CR
VAR
VAR
lineBits.BIT1
lineBits.BIT0
Chapter 3: SumoBot Sensors and Border Detection · Page 27
' show sensor readings
' display actions
' activate sensors
' discharge caps
' read left sensor
' read right sensor
' deactivate sensors
' 0 = black, 1 = line
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: