FIFO buffer for interrupt timestamps
Posted: Sun Feb 14, 2021 5:09 pm
Hi there,
I just posted a question on the rpi microPython forum but have since found the answer.
Apparently ucollections doesn't support deque on the rpi pico.
Can anybody tell me how to create a fifo buffer that I can fill with interrupt timestamps?
I am trying to hook my pi up to an ergometer to calculate speed, work, distance etc.
The machine has a rpm sensor and I am trying to read the time difference between pulses.
My thinking was that to keep the interrupt handler as fast as possible so I would store the timestamp in a buffer and read that buffer in a slow loop to update the display.
This whole programming without documentation thing is quite challenging.
I just posted a question on the rpi microPython forum but have since found the answer.
Apparently ucollections doesn't support deque on the rpi pico.
Can anybody tell me how to create a fifo buffer that I can fill with interrupt timestamps?
I am trying to hook my pi up to an ergometer to calculate speed, work, distance etc.
The machine has a rpm sensor and I am trying to read the time difference between pulses.
My thinking was that to keep the interrupt handler as fast as possible so I would store the timestamp in a buffer and read that buffer in a slow loop to update the display.
This whole programming without documentation thing is quite challenging.