Giter VIP home page Giter VIP logo

Comments (12)

Dan-Lightsource avatar Dan-Lightsource commented on August 15, 2024

The suggestion to provide an available() function makes sense.

Another option which may help, along with this, would be to extend the API to make better use of the FIFO on the IMU to provide synchronised accel/gyro samples which are timestamped by the IMU.

from arduinocore-arc32.

eriknyquist avatar eriknyquist commented on August 15, 2024

the BMI160 has a SENSORTIME register, a 24-bit counter that increments with all "sensor events" (updates to data registers). I propose using this to implement a simple IMU.available() function with no buffering, i.e. if IMU.available() returns 3 then you can only actually get the current sample. The next step will be to use the IMU's internal 1024 byte FIFO as @Dan-Emutex suggests, to make IMU.available() behave like the other available() functions and return the buffered data.

from arduinocore-arc32.

eriknyquist avatar eriknyquist commented on August 15, 2024

On further investigation, it looks like you can't really get useful information from the SENSORTIME register unless you're also using the BMI's internal FIFO to buffer samples. So I think that any worthwhile implementation of an available() function for the IMU class will need to make use of this FIFO; the simpler design I described above will be mostly useless. I'll need to keep reading the datasheet to figure out how exactly this thing works.

from arduinocore-arc32.

mjs513 avatar mjs513 commented on August 15, 2024

@eriknyquist In going over the schematic for the Arduino 101 I didn't see the BMI160 sensor connections. Reason I ask is that if a magnetometer is attached to the secondary interface of the sensor (either SPI or I2C you could read the mag data into the FIFO as well. Not sure if this is possible. As Paul can tell you mag data is used in the 9dof version of the AHRS algorithms and is intended to correct some of the gyro drifting over time.

from arduinocore-arc32.

SidLeung avatar SidLeung commented on August 15, 2024

For the Arduino 101 board, it does not have the provision to attach a magnetometer. However, the new product, tinyTILE, that was announced at the IDF event has that capability.

from arduinocore-arc32.

mjs513 avatar mjs513 commented on August 15, 2024

Hi @SidLeung thanks for the heads up. Did a quick search and found some limited info. Looks nice. However, the only thing I saw was that there are test points that supposed expose all the connections - I think. I have attached a HMC5883L through the I2C connections and works without a problem. Only issue is the syncing that was why I was asking if it would be possible to use the fifo to link it to an external mag.

from arduinocore-arc32.

SidLeung avatar SidLeung commented on August 15, 2024

You are fast, Mike. As you may notice that there are many Curie signals being brought out for external access in tinyTILE. The back side of the board is the only suitable space to accommodate them all. You may also notice that these connection points are intentionally made larger than standard test points for the purpose of soldering.

from arduinocore-arc32.

mjs513 avatar mjs513 commented on August 15, 2024

Hi Sid. Been working with IMUs and AHRS for quite awhile so this is of particular interest to me. Couldn't tell from the photos how big the connections were from the couple of photos I found on line. I did notice that the info available said it would be programmable from the Arduino IDE. So the question would then be would the corelib for the Arduino 101 be the same as for the tinyTile. I know I am jumping ahead of myself - either way would be interesting to get ahold of it when it comes out. Thanks for the info on the tinyTile.

from arduinocore-arc32.

descampsa avatar descampsa commented on August 15, 2024

Implementing a available-like function for gyroscope/accelerometer data does not seem too complex, see descampsa@773a800 and descampsa/MadgwickAHRS@83bb806. I have not tested it much yet, but on the Orientation Visualizer example, it seems to work as expected.
A proper FIFO implementation would be better, of course.

from arduinocore-arc32.

eriknyquist avatar eriknyquist commented on August 15, 2024

Thanks @descampsa, I'll try it out.

from arduinocore-arc32.

eriknyquist avatar eriknyquist commented on August 15, 2024

Thanks descampsa, tested it out and seems to work great. Made the updates below

#317
arduino-libraries/MadgwickAHRS#16

from arduinocore-arc32.

eriknyquist avatar eriknyquist commented on August 15, 2024

Latest update is a bit more flexible that my first attempt. This will be in the next release.
ee08a03

from arduinocore-arc32.

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.