122-28029 Parallax Inc, 122-28029 Datasheet - Page 261

GUIDE STUDENT SMART SENSORS

122-28029

Manufacturer Part Number
122-28029
Description
GUIDE STUDENT SMART SENSORS
Manufacturer
Parallax Inc
Datasheet

Specifications of 122-28029

Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Smart Sensors
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
2650 again. Keep in mind that this is not necessarily the optimum way to measure wheel
revolutions. That's for you to determine.
Example Program: TestWheelCounter.bs2
' Smart Sensors and Applications - TestWheelCounter.bs2
' Tracks bicycle wheel revolutions.
'{$STAMP BS2}
'{$PBASIC 2.5}
x
y
counter
DEBUG CLS
DO
DO UNTIL y > 2650
LOOP
PULSIN 7, 1, y
DO
LOOP
Mount your board inside a bicycle wheel as shown in Figure 6-18. Make sure to
keep a good insulator between the spokes and the underside of the board.
Enter, save, and run TestWheelCounter.bs2.
Spin the wheel, and verify that it beeps once per revolution.
Deadband: The range between 2350 and 2650 in the code block above is referred to as
deadband.
DO UNTIL y > 2650
LOOP
DO UNTIL y < 2350
LOOP
counter = counter + 1
FREQOUT 4, 200, 3750
PULSIN 7, 1, y
PULSIN 7, 1, y
VAR
VAR
VAR
Word
Word
Word
Chapter 6: Accelerometer Projects · Page 249

Related parts for 122-28029