130-28176 Parallax Inc, 130-28176 Datasheet - Page 44

KIT PARTS PROCESS CONTROL

130-28176

Manufacturer Part Number
130-28176
Description
KIT PARTS PROCESS CONTROL
Manufacturer
Parallax Inc
Datasheets

Specifications of 130-28176

Accessory Type
Education Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Board of Education Full Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Challenge 2-1
Perform the following:
IBIN
will see %1 or %0 depending on the state of the pushbutton. The symbol % indicates the
value is binary.
1. What effect does the code
2. Press and release the pushbutton several times slowly. How is the digital value
is a modifier to send the value as indicated in binary. In the Debug Terminal you
Disconnect on StampPlot (F6).
Save LightAlarmsWithSubroutines.bs2 under a new name.
At the end of the Initialization section of your BASIC Stamp program, add:
DEBUG CR, "!SPAN 0,2000", CR
In the Main Routine
GOSUB DisplayPB
In the subroutine sections add the following routine:
Program the BASIC Stamp and close the Debug Terminal.
Reconnect on StampPlot (F6).
of the pushbutton displayed?
DisplayPB:
Plotting Multiple Digital Values: Multiple digital values may be plotted by sending a string
of binary data preceded by %, such as %1011, which could represent four digital I/O states
or conditions. Use IBIN4 when sending 4 values to ensure leading zeros are sent.
RETURN
DEBUG IBIN PB, CR
DO...LOOP
!SPAN 0,2000
, add the code after
' Sets Y-axis range
have on the Y-Axis?
' Plot pushbutton as digital
DO
:

Related parts for 130-28176