So I hooked up our encoder and tried out both counter and encoder
all i essentially did was this:
Code:
roboInti{
sensor.start();
}
teleopPeriodic{
System.out.println(senser.getCount());
or
System.out.println(senser.getRate());
}
Now if I used a counter, I'd get crazy numbers. I'd run it for 5 seconds, and I'd get 448705 as my last number, which makes no sense.
If I used the getRate(), I get NaN
I'm assuming that I need to use setDistancePerPulse
I have the
E4P, so what should I set as the distance per pulse?