This is problematic for me as well as I am need a sample frequency of at the very least 2 kHz with the ADXL345. I was able to get this with using an anolog sensor but the I2C is another beat.
I suspect reading this that 2 kHz is not possible?
I think it is possible to read the values via SPI at 2 KHz.
The question is what are you planning to do with the data after you read it?
What board are you using? Does it support RLP? I’m not sure you can sample the sensor readings at 2KHz from managed code.
Actually I am using the FEZ panda II and writing it is an SD card. The device will be mounted outside and be running for about a week recording data when vibrations exceed a certain range. I have a few problems that are mostly due to the hardware limitations.
Using analog sensors I was writing the data to a jagged array and then dumping the data when it reached a certain memory threshhold. The prblem is this was 250 x,y,z, time stamp data sets and far to little at 2kHz to be useful.
I decided to use digital sensors for 2 reasons: Less noise and the ability to have more sensors. My advisor want two sensors now and this means I2C as analog will not cut it. Unless I can find a board with 6 analog inputs.
I see it supports RLP. I would use a Timer in RLP to read the samples and write them to a buffer. Once the buffer is full, trigger an event to the managed side and write the buffer to the file. I guess it would be fast enough.
We’re building a robot. We have two quadrature rotary encoders for the wheels which are handled by a PIC, the Panda then has to poll the encodervalues from the PIC to make adjustments on the speed of the motors. To go as straight as possible we’d like to do this around 250 times per second.
The PIC has some alternatives to using i2c, such as SPI and UART. As of now we’re running I2C at 400KHz
The polling would probably go faster by running i2c in RLP yes, but there is no fast way of getting the data from the RLP side to the managed side then, is there?