|
Re: Hall Effect Latch as an encoder/counter?
Quote:
Originally Posted by iambujo
As a followup to this thread, we have fully integrated the custom hall effect sensor into our 2012 robot. Using the WPI counter libraries we are able to get the current speed of the wheel. The shooter goes upwards of 4000 RPMs and the sensor as no issues in keeping up. We mounted 2 tiny rare earth magnets 180 degrees out of phase, opposite poles. So a single period of the square wave is 1 rotation.
I believe SW is now using getPeriod() in the counter class, but if they called it too often it sometimes had bad data (I guess before the period completed or before the internal API was about to update the value from the hardware?).
|
can you verify that the getPeriod method in the counter class works? i've tried using it but only get "infinity" when i run it...
__________________
Wendy
Team 3502
|