Giter VIP home page Giter VIP logo

Comments (7)

jefmenegazzo avatar jefmenegazzo commented on June 14, 2024

@pdrewes

Please provide more information about your environment:

  • Which platform? Raspberry Pi?
  • Which MPU model? 9250?
  • How are you using it? Just an MPU? Two, a slave and a master?
  • Provide your source code.

If you are using something simple like just an MPU in RPi, use the master-only-mode.py' file in the examples folder.

from mpu-i2c-drivers-python.

pdrewes avatar pdrewes commented on June 14, 2024

from mpu-i2c-drivers-python.

jefmenegazzo avatar jefmenegazzo commented on June 14, 2024
  • The OSError: [Errno 121] Remote I/O error means that the OS's I2C bus could not find the address of your magnetometer (AK8963). So it's a hardware problem, not this library.

  • Run sudo i2cdetect -y 1, your magnetometer should appear at address 0x0C.

  • If you are not using the MPU as a master slave, then use only master-only-mode.py as described in the documentation.

  • I recommend running:

import sys
sys.path.append("")

import time
from mpu9250_jmdev.registers import *
from mpu9250_jmdev.mpu_9250 import MPU9250

mpu = MPU9250(
    address_ak=AK8963_ADDRESS, 
    address_mpu_master=MPU9050_ADDRESS_68, # In 0x68 Address
    address_mpu_slave=None, 
    bus=1, 
    gfs=GFS_1000, 
    afs=AFS_8G, 
    mfs=AK8963_BIT_16, 
    mode=AK8963_MODE_C100HZ)

mpu.reset() 

Afterwards, restart your RPi and re-run sudo i2cdetect -y 1 to see if the address 0x0C appears.

from mpu-i2c-drivers-python.

pdrewes avatar pdrewes commented on June 14, 2024

from mpu-i2c-drivers-python.

JGonzalga avatar JGonzalga commented on June 14, 2024

Hello, I am struggling with the same problem, I only see the 0x68 device when running sudo i2cdetect -y 1 and then the master-only-mode.py script shows the same error: OSError: [Errno 121] Remote I/O error

were you able to solve it?

Thanks,
Josué

from mpu-i2c-drivers-python.

pdrewes avatar pdrewes commented on June 14, 2024

from mpu-i2c-drivers-python.

JGonzalga avatar JGonzalga commented on June 14, 2024

I was not able to solve it with these libraries. I had to use other ones to get all the data. It would not recognize the magno portion of the sensor no matter what I did.

On Jun 21, 2021, at 8:34 AM, JGonzalga @.***> wrote:  Hello, I am struggling with the same problem, I only see the 0x68 device when running sudo i2cdetect -y 1 and then the master-only-mode.py script shows the same error: OSError: [Errno 121] Remote I/O error were you able to solve it? Thanks, Josué — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Can you share which libraries did work for you?

from mpu-i2c-drivers-python.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.