Comments (12)
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.
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.
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.
@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.
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.
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.
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.
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.
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.
Thanks @descampsa, I'll try it out.
from arduinocore-arc32.
Thanks descampsa, tested it out and seems to work great. Made the updates below
#317
arduino-libraries/MadgwickAHRS#16
from arduinocore-arc32.
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)
- Error compiling for board Arduino/Genuino 101. HOT 7
- Peripheral not connectable when broadcasting characteristic value
- Incorrect capitalization of true in CurieIMU documentation HOT 3
- some EEPROM.CPP ERROR HOT 1
- SPI.beginTransaction allows SPISettings faster than 8 MHz
- Cannot discover attributes HOT 1
- Limited error messages, when selecting the wrong COM port
- How to using UART ISR ?
- [Urgent][Stuck Problem] BLE setValue in callback function!
- Can't send BLE data less than 25ms? HOT 3
- Crashing when three or more characteristics are updated every 30ms? HOT 1
- CurieBLE - BLECommon dosen't existe .. HOT 2
- CurieBLE for HM-11
- Should extra_flags be empty in platform.txt? HOT 1
- SoftwareSerial core library
- IPAddress missing definition of operator!=()
- When I try to upload a simple sketch to the Arduino 101, I get the following error on Mac M1 (macOS Monterey) HOT 3
- No tag for 2.0.6 release
- error: #error "This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor." #error "This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor." HOT 2
- Placing the breadboard with BMI160 to horizontally(remapping axis) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinocore-arc32.