I have two related questions. I'm happy to get advice or links to recommended reading as well.
How many times per second can a Pi pull data over SPI
Over SPI what sort of timescale can I query measurements on? I'm curious if the Pi is limiting here as I know one of the Arduino's benefits is fast timings? (In my case the sensor's limit is 1 kHz)
What is the best practice for achieving high rates? In the past I have written a loop in python which repeatedly polls the sensor. Should I be doing something more sophisticated?
At these timescales, how much should I worry about lag of the Pi?
When recieving data in rapid succession, how should I usher it to disk without the program waiting for a write
- It seems that the sensor polling should happen concurrently/independently of my digestion of the data stream.
I have two sensors - a break beam sensor and an accelerometer. I want to save to disk the sensor data from 1 second before to 5 seconds after the beam is broken. Realistically, post processing the data would be fine here, but my "extra credit" project for myself is to filter the data to be saved prior to writing to disk.