I’m working on a Senior Project for my BS in CS. I’m using a Pimoroni lsm303d connected to a raspberry pi, I’m using the Pimoroni python files on git, to collect frequency data from a gate actuation.(Converting G’s to Freq with FFT’s. Yes this works, I just want to do it better)
Because of this I want to run the accelerometer at 1600hz and read it from a buffer.
Currently I’m reading the x,y,z data in a loop which creates irregular intervals. I can use sleep timers but that seems like sloppy work. So I’d like to use the FIFO buffer.
So first question: Would enabling FIFO actually give me a buffer larger then the 6 bytes I started with?
If so how do I enabling and use FIFO.
here is the initial file
lsm303d-python/library/lsm303d at master · pimoroni/lsm303d-python · GitHubinit.py
Here is the official pdf
I’m assuming the problem lies in configurations. From the PDF I looks like I simply need to change some register values. But I’m just not sure which ones, nor do I understand how to properly read the values as expected.
I would appreciate any help getting this to work.