Pseudo Code: MPU6050 to guide robot?

Hi!

I'm trying to use the inclination angles from my MPU6050 (I'm using two sensors to help with this) to help me guide part of a robot to a certain angle automatically. I'm able to get inclination/tilt angles about the x and y axis.
I'm also able to get the inclination about the z axis, but the numbers aren't what I expect.
Can someone explain what this should give me? Or what it means?

For example, I put the sensors on some flexible twig thing, at the top. And I sweep the sensor on that angle. I assumed that the angle would stay the same?

The description of your arm is not very clear, you'll have to provide much more detailed information and diagrams.

Have you already tried to read the required parameters from the MPU? Will the values return to the original values when you move the sensor and then restore its initial position and orientation?

It sounds like your 'motors' are acting in opposing pairs?

The accelerometer can measure tilt with respect to gravity. I'd worry you won't be able to get left/right information.