Problem with accelerometer

AWOL:
You don't initialise xa, ya, za in "loop".
Is that right?

Oops I didn't notice that. But that's not what the problem is (I must have gotten rid of the initialization while commenting the code to post here).