27404 Parallax Inc, 27404 Datasheet - Page 128

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
has to be changed back to an input first. So, the Main Routine of TestPushButton.bs2
will not serve our purpose, but this simple subroutine will.
Some of the initialization routines will not be necessary. Others, like
are crucial. It's important to pick and choose what you'll need for both the Initialization
and Main Routine. You'll need to make sure to call all the subroutines and display only
the relevant values.
Example Program: TestAllSensors.bs2
' -----[ Title ]--------------------------------------------------------------
' Applied Robotics with the SumoBot - TestAllSensors.bs2
' This program is a combination of the following:
'
'
'
'
'
' Important: You must start with the QTIs seeing black.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]---------------------------------------------------
- QtiPulseDecayTrick.bs2
- TestFrontIrObjectDetectors.bs2
- TestSideIrObjectDetectors.bs2
- TestPushButton.bs2
- TestLedSpeaker.bs2
Add a
Read_Pushbutton:
Construct an Initialization section and Main Routine that will make your
program function.
Test and troubleshoot it.
Convert all active low bit variables to active high.
Compare what you came up with to the TestAllSensors.bs2 below.
Run and test TestAllSensors.bs2.
INPUT pbSense
pushbutton = pbSense
RETURN
Read_Pushbutton
subroutine:
' Target = BASIC Stamp 2
' Language = PBASIC 2.5
' Set I/O pin to input
' Store state of pbSense
Calibrate_Qtis

Related parts for 27404