27404 Parallax Inc, 27404 Datasheet - Page 139

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
Remember, the goal of all this work is to make the program more easily expandable. The
other goal is to make it so that you can move parts of this program to other programs that
follow the same conventions. However, it still has to perform the same functions that it
did before the adjustments.
Example Program: SensorsWithTempVariables.bs2
' -----[ Title ]--------------------------------------------------------------
' Applied Robotics with the SumoBot - SensorsWithTempVariables.bs2
' Demonstrates the use of a temporary and multipurpose variable in conjunction
' with DATA, WRITE, and READ for calculating, storing, and using the qti
' threshold value.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]---------------------------------------------------
qtiPwrLeft
qtiSigLeft
qtiPwrRight
qtiSigRight
DummyPin
IrLedLF
IrSenseLF
IrLedRF
IrSenseRF
IrLedLS
IrSenseLS
'
Enter, save, and run SensorsWithTempVariables.bs2
Verify that the QTIs work the same as before.
PULSOUT DummyPin, temp
qtiLF
qtiRF = ~qtiSigRight
PULSOUT DummyPin, qtiThreshold
.
.
.
PIN
PIN
PIN
PIN
PIN
PIN
PIN
PIN
PIN
PIN
PIN
= ~qtiSigLeft
10
9
7
8
6
4
11
15
14
2
1
' Target = BASIC Stamp 2
' Language = PBASIC 2.5
' Left QTI on/off pin P10
' Left QTI signal pin P9
' Right QTI on/off pin P7
' Right QTI signal pin P8
' I/O pin for pulse-decay P6
' Left IR LED connected to P4
' Left IR detector to P11
' Right IR LED connected to P15
' Right IR detector to P14
' Left IR LED connected to P2
' Left IR detector to P1
' Wait for threshold time
' <--- New wait threshold time
' Snapshot of QTI signal states

Related parts for 27404