Giter VIP home page Giter VIP logo

Comments (5)

peterhinch avatar peterhinch commented on May 27, 2024 1

@turbinenreiter the driver can already take an I2C object as an argument. We implemented this on 19th March this year.

from micropython-mpu9x50.

peterhinch avatar peterhinch commented on May 27, 2024

The pyb module is specific to the Pyboard. These drivers were developed for this platform.

If you are running the code on a Pyboard, what is the exact error message you are seeing? Otherwise please let us know your platform - we might consider doing a port.

from micropython-mpu9x50.

CharlesCCC avatar CharlesCCC commented on May 27, 2024

@peterhinch Got you. That make sense now. Sorry, my bad, I was trying to use it for the Raspberry Pi. I don't know if this is another platform that you would like to support. Appreciated you guys' work.

from micropython-mpu9x50.

peterhinch avatar peterhinch commented on May 27, 2024

I have no plans to support the Pi: my interest is in platforms running MicroPython on bare metal. Unless @turbinenreiter has such intentions you may need to look elsewhere, or DIY. It shouldn't be too difficult, but you'd need to study and compare the Pi's I/O with that of the Pyboard.

from micropython-mpu9x50.

turbinenreiter avatar turbinenreiter commented on May 27, 2024

@CharlesCCC
Step 1: Change the whole driver to take an I2C object as argument instead of creating it itself in imu.py, mpu9150 and mpu9250.py.
Step 2: In imu.py change the _read and _write methods to whatever your platforms equivalent of the contained commands are.
Step 3: Send a pull request.

This should really be straightforward.
Find the RPi I2C doc here: http://www.raspberry-projects.com/pi/programming-in-python/i2c-programming-in-python/using-the-i2c-interface-2

Step 1 is something I wanted to do for the longest time, but I switched to using the BMX055 and therefore this is quite low on my list.

from micropython-mpu9x50.

Related Issues (20)

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.