-1

I am working on a project which uses an accelerometer with an arduino Nano.

I am using the MPU6050. However I have the same static values wether I move the MPU6050 or not... I only get -1. That's really frustrating considering that all the tutorials I have watched achieve to retrieve data.

To begin with, I connected the MPU6050 with the arduino like so : enter image description here

Then I used the official code https://playground.arduino.cc/Main/MPU-6050#short that is to say this one :

enter image description here

And that's what I get ...

enter image description here

I bought a new one, but I still have the same issue...

If someone has any Idea, I would really appreciate !

Thanks

E.B
  • 141
  • 3
  • 15

2 Answers2

2

How do you know the I2C device address is correct? You could try scanning the bus to discover all the devices and their addresses. That would confirm your bus setup is working as well. Found this quick guide on accomplishing this: http://henrysbench.capnfatz.com/henrys-bench/arduino-projects-tips-and-more/arduino-quick-tip-find-your-i2c-address/

"The I2C-address depends on the AD0 pin of the sensor. If it is connected to ground, the address is 0x68. If it is connected to VLOGIC (+3.3V) it is 0x69. There are a few sensor boards with the MPU-6050 sensor already soldered on it."

  • I also tried 0x69 but I got the same result. When I test the piece of code of the link to found the I2C address, it found 0 device. The mpu6050 only needs 4 wires to run as i saw in tutorials : 1 for 5 or 3.3 V 1 for the ground, A4 of the arduino for the SDA pin and finally A5 of the arduino for the SCL pin of the sensor – E.B Aug 13 '18 at 15:37
-1

So it is indeed necessary to solder the pins. We didn't thought about this because we connected VCC and GND without soldering as well and the LED was working fine whereby we assumed that it should be enough to stick them together for now. Seems like we were wrong and I've got now three working gyros at home.

Henry
  • 1