I am working with the MPU-6050 (GY-512) and downloaded the “jrowberg” library. I connected everything to the arduino UNO (vcc = 5v, gnd = ground, scl = A5, sda = A4).
I tried to run the “RAW” example and opened the serial monitor to find out that it just stops after “intializing I2C devices…”. I also tried the I2C scanner from the arduino playground, but it also stops after “scanning…”.
It doesn’t say something like “no devices” or “connection failed”
I used the following small program (just temperature measurement) to make a functional check of my MPU6050 sensor. The device address of my sensor is 0x69 (keyed in the Library Files). You may try it.
Connection:
Vcc -----> 5V
GND ----> GND
SCL ----> A5 (SCL) of UNO
SDA ----> A4 (SDA) of UNO
xDA ----> no connection
xCL ----> no connection
ADD0 ----> 5V (to select device address at 0x69).
INT -----> no connection
Move your A4 wire to SCL and your A5 to SDA. The code you are using A4 and A5 are the pins for SCL and SDA on the Nano, but on the UNO it is separate or you can redirect to A4 and A5, but why? Just use the pins that were meant for it.
This is the library which I am using for my MPU6050 sensor. The address is keyed as 0x68 in the library file, and it can be checked/edited by opening the *.h file.
Execute this (attached with this post) address scanner program and see what address is detected for your MPU6050. This program checks for all I2C devices in the address range: 0x50 - 0x6F.
Today at 05:04 pm
Ive done everything you said but again it doesnt go further after something like "scanning...".
What is this?
After running the address scanner program, the output should be one of the following:
FOUND message on the Serial Monitor with a list of addresses that have tested not found message on the Serial Monitor with a list of addresses that have been tested
The system hangs which means that there is some some problem with your MPU6050.
If you see that the system hangs, remove MPU6050; re-run the address scanner program. The message on the Serial Monitor should be not found.