I want to measure speed with one infra gate. The width of the bypassing object is known therefore I could calculate the speed. However the infrared gate would be interrupted only for 3-10ms. I understand raspi is not real time but it doesn't matter for me as far as I can get the exact time between low-high and high-low.
My pigpio library will let you reliably time gpio transitions to within a few microseconds.
The library itself is written in C but you can use any language you want to capture the data (the events are time-stamped at source).
-
-
3@goldilocks That does NOT affect pigpio's time-stamping of gpio events. The gpios are sampled by the hardware DMA engines which are pretty much insulated from system activity. – joan Nov 8 '14 at 17:16