Giter Club home page Giter Club logo

bno080's Introduction

bno080

A rust embedded-hal driver for the Hillcrest Laboratories / Bosch Sensortec BNO080 9DOF AHRS

This sensor device combines a triple axis accelerometer, gyroscope, and magnetometer, and contains an ARM Cortex M0+ for fusing all the sensor data into a meaningful rotation vector.

For reference, see the original Hillcrest BNO080 driver implemented in C.

Status

  • Basic i2c interface support
  • Some tests for decoding and encoding methods
  • Basic SHTP protocol support
  • Basic SPI support
  • Usage examples
  • CI
  • Support for calibration
  • Support for tare
  • Support for external barometer (eg bmp280)
  • Support for external light sensor

Examples

The bare metal application I've been using to test this driver with multiple MCUs is test_bno080_ehal

bno080's People

Contributors

tstellanova avatar eupn avatar

Stargazers

Ashwin Narayan avatar Nelson Chan avatar vad babushkin avatar Ryan Butler avatar Rafael Bachmann avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

bno080's Issues

Connection Errors

When I use the I2C interface, I can connect to my BNO085 (back-compatible with BNO080), but some sensor update messages appear to be silently ignored. I tracked this down in a fork as being an apparently incorrect invalid packet check. Fortunately it's also seemingly unnecessary and can be safely removed to fix this particular issue; see fix here: dragazo@df1ac69.

However, when I use the SPI interface, I cannot connect to my device at all, and get no messages coming from the device. I've even tried modifying a local copy of this crate in a few suspicious places, but nothing seemed to solve the problem. And unfortunately I really need SPI for my application, cause I2C simply doesn't have the throughput I need.

Possibly related to #5 since this fails at initialization. In fact, @TheButlah, did you every find a fix for that in your fork? It doesn't look like any commits have been pushed after forking so far.

CommError during soft_reset and init

I'm using an esp32c3 (which has support for a small amount of non-configurable clock stretching currently). When sending commands to the bno, it is normal/commong for the bno to take some time to be ready to respond. The bno will signal via the interrupt pin when the host mcu should read for data. However, this driver immediately attempts to read from the bno without checking the interrupt pin, resulting in a failed read (typically via a nack, but sometimes via an i2c timeout, presumably due to the lengthy clock stretching the bno employs).

If the driver provided an optional interrupt pin, this pin could be checked to determine if a read is possible. If the pin is unspecified, the driver could instead fall back to reattempting the read, several times until a specified timeout.

I will need to implement support for this feature in my firmware but I would ideally like to avoid a hard fork of this driver. I wanted to know:

  • Is there interest in accepting a PR for this functionality?
  • Do you have a preferred strategy for me to do that, so that I know before implementing it and are more likely to get it merged.

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.