Multiple GY-521 sensors on Arduino

Hi!

I'm trying to connect two GY-521 too but I have problems with quaternions obtained. Sometimes the values are greater than one and other times the values leap.
I think it could be because there are problems in my code (attached, sorry for the "spanglish") with the use of I2C bus but I can't identify the problem yet.

Could anyone connect two GY-521 without these problems?

Can anyone help me?

Thanks in advance.

Code.txt (11.8 KB)