Quote:
Originally Posted by IceStorm
We weren't necessarily trying to get it to count up and down as long as we were able to get it to count 1 direction and have the ability to reset the count when the direction changes would have worked as well for us.
|
You could use the falling output from the analog trigger to reset the counter.
Quote:
Originally Posted by IceStorm
It looks pretty straight forward other than we will need to adjust our high and low triggers and I'm not sure (with only looking at the code for a few seconds) what type of value in need to put in for Max RPS.
|
The analog triggers are susceptible to noise on the analog inputs. One way to combat this is to enable averaging of the analog inputs. However, if you average too much, you'll miss transitions. If you put in the Maximum Reveolutions Per Second (or in your case transitions per second) that the sensor will see, the library I wrote will calculate the right amount of averaging for maximum noise rejection and still catch all transitions. You can also help it by making sure a very high sample rate is used for the analog module.