I'm not seeing the full picture (probably my limitation). However it struck me you could focus on different things at different time. i.e. not all in one loop.
For instance,
- hold off the serial com when measuring the pendulum movement.
- Then don't measure the pendulum when performing serial communications.
In addition, I would write a small program that only reads the encoders, nothing else. Once you get that functioning properly you can likely see how to add the remaining functions.