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

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 5-6 Solution
To the declarations add:
(Note: Adjust the value of
used.)
In the main
Add a subroutine:
ReadTach:
To
Opto_SW
Opto_Count
RPM
CyclesPerRev
GOSUB ReadTach
RETURN
DEBUG "!STAT RPM=", DEC RPM, CR
COUNT Opto_SW, 1000, Opto_Count
RPM = Opto_Count*60/CyclesPerRev
PlotData
DO...LOOP
add:
PIN
VAR
VAR
CON
add:
8
Word
Word
4
CyclesPerRev
' Count from opto-reflective switch
' Calculated RPM
' Number of pairs on encoder used
' Measure counts per unit time
' Calculate RPM
accordingly for the encoder wheel

Related parts for 130-28176