I am new to Arduino and have run into a problem with the ADXL3 sensor example as i have a GY-521 and a Mega2560. The example uses a UNO and ADLx3 which gives strange results when i run the sample code. I have searched through the web for GY-521 on a Mega2560 but all of the examples and wire configurations, although they compile with no errors, all have the same issue. When i move the GY-521 the printout does not display the changes in x, y and z. It just keeps repeating the same values.
I am looking for code and wiring that actually work.
I ran the test program and received a message saying
15:59:30.540 -> C:\Elegoo\Testlib\GY521-0.3.6\GY521-0.3.6\examples\test1\test1.ino
15:59:30.681 -> 102 Could not connect to GY521
15:59:31.665 -> 1102 Could not connect to GY521
15:59:32.650 -> 2104 Could not connect to GY521
15:59:33.681 -> 3104 Could not connect to GY521
15:59:34.665 -> 4105 Could not connect to GY521
Is it a problem with my pins. I have the following connections:
GY-521 Mega 2560 ver 3
VCC 3.5 Volt
GND GND
SCL SCL
SCD SCD