Thanks for your help guys. Just wanted to leave a record of how I fixed the problem for future reference.I did not want to change any of the source code in case I needed the same code without the changes in the future so I ended up getting a logic level converter(they are very cheap).I got the Sparkfun logic level converter and there is one little detail that should be kept in mind when using it. Since i2c lines need 2 way communication, make sure to use the bidirectional Tx lines on the logic level converter and not the Rx lines. Anyway, in the end I did not change any of the code and my setup was as follows:Arduino +5V to VCC on GY-521 and to Hv on the Logic Level ConverterArduino +3.3V to Lv on the Logic Level ConverterArduino GND to GND on Gy-521 and both GNDs on the Logic Level ConverterArduino analog input pin A4 to ch1 Tx on Hv side and ch1 Tx on the Lv side to SDA on GY-521Arduino analog input pin A5 to ch2 Tx on Hv side and ch2 Tx on the Lv side to SCL on GY-521thanks again for your help
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16