Forum >Troubles connecting MPU6050 to ESP32 dev module
Troubles connecting MPU6050 to ESP32 dev module

Hi,
I tried to connect the MPU6050 to ESP32 dev module using the sample code. I changed Wire.begin() to Wire.begin(22,21) to make sure I2C would work.
Turns out that depending on which computer I compile the code, I sometimes can read values, while other times the sensor does not connect at all.
furthermore, when I read values they seem to be fairly random, since even holding the sensor still on a table the values read non-zero and fluctuate a lot!
Any idea on how to fix that?
Thank you!
I tried to connect the MPU6050 to ESP32 dev module using the sample code. I changed Wire.begin() to Wire.begin(22,21) to make sure I2C would work.
Turns out that depending on which computer I compile the code, I sometimes can read values, while other times the sensor does not connect at all.
furthermore, when I read values they seem to be fairly random, since even holding the sensor still on a table the values read non-zero and fluctuate a lot!
Any idea on how to fix that?
Thank you!