Quote:
Originally Posted by Joe Ross
I would expect that I2C could be less efficient then DIO. You were also doing your test in java and with lots of additional calculations, right?
|
Understood that DIO is much faster and yes we are using Java. Rough calculations show ~1ms to read the sensors, so that is significant, but should not be a show stopper.
Lots of calculations is a relative term, we are doing the heavy lifting (atan) in the teleop routine and as little as possible in the PID routine. If I were coding it, it could be even faster, but we try to stay within the capabilities of the students. 15ms should be fine for a drive train PID (WPI uses 50ms). Most of our sensors have programmable on chip filtering which we set to <50Hz bandwidth to minimize aliasing.