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

GUIDE STUDENT PROCESS CONTROL

122-28176

Manufacturer Part Number
122-28176
Description
GUIDE STUDENT PROCESS CONTROL
Manufacturer
Parallax Inc
Datasheets

Specifications of 122-28176

Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Propeller Education (PE) 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 122-28176