question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RuntimeError: MPU6500 not found in I2C bus.

See original GitHub issue

Hi, I’ve wired the sensor to nodemcu esp8266, however the library si giving me the following error:

Traceback (most recent call last): File "<stdin>", line 6, in <module> File "mpu9250.py", line 39, in __init__ File "mpu6500.py", line 103, in __init__ RuntimeError: MPU6500 not found in I2C bus.

Wiring: CLK->pin D1, SDA->pin D2.

i2c scanner shows:

Scan i2c bus… i2c devices found: 1 Decimal address: 104 | Hex address: 0x68

I’m using MicroPython v1.12 on 2019-12-20

What could be wrong?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tuupolacommented, Mar 22, 2020

You should be able to use the standalone MPU6500 witch something like following:

from machine import I2C, Pin
from mpu6500 import MPU6500

i2c = I2C(scl=Pin(22), sda=Pin(21))
sensor = MPU6500(i2c)

print("MPU6500 id: " + hex(sensor.whoami))
1reaction
tuupolacommented, Mar 22, 2020

MP65 suggests the chip is the standalone MPU6500. Also the WHOAMI value suggests it is the standalone MPU6500 and not the MPU9250 SIP. In other words it does not include the magnetometer.

I have only been testing with MPU9250 which was why I did not catch earlier that the standalone accelerometer has different WHOAMI value. Will commit a fix soon. Thanks for the heads up!

Read more comments on GitHub >

github_iconTop Results From Across the Web

micropython-mpu9250/mpu6500.py at master - GitHub
MicroPython I2C driver for MPU9250 9-axis motion tracking device - micropython-mpu9250/mpu6500.py at ... raise RuntimeError("MPU6500 not found in I2C bus.
Read more >
Python Examples of machine.I2C - ProgramCreek.com
Source Project: micropython-mpu9250 Author: tuupola File: mpu6500.py License: MIT ... not in [0x71, 0x70]: raise RuntimeError("MPU6500 not found in I2C bus.
Read more >
Problem with I2C connection with MPU9250 - Arduino Forum
This code finds the I2C channel and prints: found i2c device on 0x68 and is mpu6500 and ready to use: #include "MPU9250.h" uint8_t...
Read more >
I2C driver problems and best practices - MicroPython Forum
I am not aware of any best practices, so I took inspiration from I2C drivers ... ENODEV: raise RuntimeError("Sensor not found on I2C...
Read more >
ImportError : cannot import name i2c
(1) I have installed micropython-mpu9250. (2) I have detected the i2c bus using "i2cdetect -y 1". Problem. How come my program don't ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found