Closed mraugit closed 4 years ago
Neat. It's probably limited by I2C comm at 1MHz. I just tried it and got up to about 900Hz:
The serial buffer is getting corrupt but I can get to ~911Hz. I added example 8 to the lib so you can see what I did:
Oh, and we've got a 1ms delay inside SPARKFUN_LIS2DH12::waitForNewData(). Removing the delay doesn't seem to help. We're polling where if you're really trying to hit 5k, you'd probably need:
Thank you for checking. I definitely need the 5 kHz sampling rate. However, I fear that my knowledge is not sufficient to extend the library with SPI and interrupt communication.
We don't plan to support SPI anytime soon but we welcome a PR. It looks like this accel and library are going to be limited to ~1kHz for now.
It is not possible to read acceleration data with a frequency of approx. 5 kHz.
Workbench: Development board: Sparkfun edge Library Version 1.0.0 (Version from Arduino IDE) Powered by USB?
Steps to reproduce: I use the Example: Example1_BasicReadings with the following modifications:
Expected behavior
I expect to get approx. five outputs every second
Actual behavior
The max. frequence is about 500Hz