28029 Parallax Inc, 28029 Datasheet - Page 272

KIT PARTS SMART SENSORS W/TEXT

28029

Manufacturer Part Number
28029
Description
KIT PARTS SMART SENSORS W/TEXT
Manufacturer
Parallax Inc
Datasheet

Specifications of 28029

Accessory Type
Parts Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
BASIC Stamp® or Javelin Modules
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Other names
28029PAR
Page 260 · Smart Sensors and Applications
' Smart Sensors and Applications - Ch6_Project2.bs2
' IMPORTANT, follow the instructions to come up with your
' own values.
' Examine the solution to Project 2 for information on how to
' determine your own StepLow and StepHigh constants.
' {$STAMP BS2}
' {$PBASIC 2.5}
StepLow CON 2900
StepHigh CON 3300
y
yOld
stepCnt VAR Word
yOld = 3300
PAUSE 250
SEROUT 14, 84, [22, 12]
PAUSE 5
DO
LOOP
PULSIN 7, 1, y
IF (y <= 2900 AND yOld >= 3300) OR (y >= 3300 AND yOld <= 2900) THEN
ENDIF
SEROUT 14, 84, [128, DEC5 stepCnt / 2]
yOld = y
stepCnt = stepCnt + 1
VAR Word
VAR Word
You will find the Solutions section of Chapter 6.
' Debounce the power supply
' Start LCD & clear display
' Pause 5 ms for clear display

Related parts for 28029