Iam trying to rotate GEM object with my android phone, sending from acc sensor througth OSC

Gem object rotateXYZ is not the solution for that, maybe because of gimbal lock effect...

Did anybody similar working patch in pd ? Or can somebody hel me ?
many thanks.

fk.