4 ms·
Many years ago I was trying to build a "shot counter" to measure balls fired per second for a college paintball league. I ended up using sox + some Perl to be
by alexpotato 3y ago
Many years ago I was trying to build a "shot counter" to measure balls fired per second for a college paintball league.
I ended up using sox + some Perl to be able to:
- filter out only the frequency of the gun cycling
- identify the peak amplitude to know when a shot started
- use a sliding window of about 30ms to figure out when the shot ended
- once the above was done, I could count how many shots per second and output it
I even posted the code which you can see here: https://www.pbnation.com/showthread.php?t=3216349&highlight=linux https://www.pbnation.com/showthread.php?t=3216349&highlight=...