I am using MPU6050 with arduino. It reads something but not numerical values!
1- Connections are the same as in below.
2- Then I added i2cdev library from here and mpu6050 library from here
I copied them to C:\Program Files\Arduino\libraries.
3- I tried DMP6 example and it gives random characters
4- I tried MPU6050_raw example . You can see it constantly gives same characters but not numerical values
5- Here, I saw this topic MPU6050 DMP does not work? and uploaded i2c_scanner to device. It says "No I2c devices found". Why?
6- I saw another topic https://forum.arduino.cc/index.php?topic=404031.0 just the same as in my case. I also tried the code there, it seems working but it gives constantly -1 for accelerometer and gyro values even though I move MPU6050.
答案 0 :(得分:1)
完整回答以便关闭此问题:
MPU6050_DMP6.ino
以115200波特的波特率输出,MPU6050_raw.ino
以38400波特率输出,但串行监视器设置为9600,导致UART接口失效并产生垃圾字节。AD0
用于选择I2C地址的低位。该引脚应上拉至VCC或下拉至GND。在这个例子中,它没有连接/浮动,这导致设备没有稳定的固定I²C地址。通过将AD0与GND连接来解决此问题。