Encoder library function which supports resolution and counts per rev

Hello, I am using the standard encoder library (encoder.h) by Paul Stoffregen. Is there another library; or function; or any kind of work around; that lets me input "resolution" and "counts per rev or CPR" within, sort of like this

Encoder encoder1(encoderPinA1, encoderPinB1, resolution1, countsPerRev1);

Thanks

JZ
 
I need to explain some more..... The CPR and resolution of my encoders is fixed by it mechanical design, the number of slots cut out etc, but I am looking to modify these values in my Teensy software by multiplying or dividing by constants so I can manipulate these parameters via software,
 
Not sure what you mean by "resolution". With encoders, you can either count pulses over some time period, or you can count measured the period (time in clock pulses) between encoder edges. If your encoder has a high CPR, you can probably get decent resolution via pulse counting, but if your encoder has lower CPR, or you need updates very frequently, then you probably need period measurement. Take a look at library FreqMeasureMulti if you are interested in period measurement.
 
Back
Top