).
My issue is that when I try to get the adress of the MPU6050 I receive the message on the Arduino IDE "No I2C devices found", here is my code:
#include <Wire.h>
void setup() {
Wire.begin();
Serial.begin(115200);
Serial.println("\nI2C Scanner");
}
void loop() {
byte error, address;
int nDevices;
Serial.println("Scanning...");
nDevices = 0;
for(address = 1; address < 127; address++ ) {
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0) {
Serial.print("I2C device found at address 0x");
if (address<16) {
Serial.print("0");
}
Serial.println(address,HEX);
nDevices++;
}
else if (error==4) {
Serial.print("Unknow error at address 0x");
if (address<16) {
Serial.print("0");
}
Serial.println(address,HEX);
}
}
if (nDevices == 0) {
Serial.println("No I2C devices found\n");
}
else {
Serial.println("done\n");
}
delay(5000);
}
I have tried a couple of things to bypass this issue: Change the wires --> still the same issue
change de the pins, I initially used the pins 22 and 21 then I have switched to pins 15 and 16 --> still the same issue
Change the power supply started with 3.3 V and I've switched to 5V --> still the same issue
Do you have an idea of what I could do to solve this issue ?
Please don't cross post the same question all over multiple sites. It wastes people's time. You think you've increased your audience, but it is mostly the same people on both sites and a lot of them are ignoring you now because you show to value to our time.
Especially for something where you haven't even connected the wires. Just jamming them in the hole isn't a connection. It ahouldn't surprise you that it doesn't work.
Many of your wires are in the wrong place. Move the I2C board to the middle of the breadboard and there is a Red wire at the back of the ESP32 connected to nothing.
thank you for your help. I have soldered the MPU6050 to the pins.
We can clearly see on one of the image that the MPU6050 is running (green light on).
However I still cannot detect the I2C device, the error is still the same "No I2C devices found". I have also tried the code Adafruit MPU6050, it looks that I have a feedback coming out but the results are not what I expect :
7:52:56.359 -> Acceleration X: 1.22, Y: 40.58, Z: 16.55 m/s^2
17:52:56.359 -> Rotation X: -1.30, Y: -3.27, Z: 0.00 rad/s
17:52:56.359 -> Temperature: -11.56 degC.
Post #5 showed you there was a gap in the bus bars in the bread board.
The first picture of that last post is showing that the orange wire to 5v is above the chip rather than along side it.
The reason why the LED is glowing is not proof it is working, it is a result of parasitic powering through the signal to the chip. This will light the LED but the board will not function correctly.
Thank you for your quick answer, I confirm it looks above the chip on the picture but it is not. The wire is well aligned with the vcc pin of the MPU6050. Moreover I did not
use the 5v supply but the 3.3v. I tried the 5v supplied aswell but it did not change the result, I still not find I2C device.
That is odd because I don't understand how this orange wire is making contact if it is above the pin. The connecting tracks on the bread board run horizontally at this point, as seen in your photograph, not vertically. So how is it making contact even if it is aligned above it?