Hi everyone, I'm back with my timegrapher project using ESP32. For my project I'm using a mechanical watch with 21600 tics per hour. On the first graph we can clearly see 6 tics in a second and in a hour we'll clearly get those 21600 tics
My goal is to count those tics, as we can see, those tics are not only one line, there are like 6 "blocks" with different peaks. My question is to know if it is possible to count the peak of those tics or is it possible to have a graph only with peaks, just like the black line on the graph
Surely you have the underlying numbers for the graph. What do they show for the various peaks? Once you know the average number, you can test for a number greater than the average. When true, that is the beginning of a peak. When the numbers are back to the average, the peak has ended and you can add one to a counter.
Hi Paul, I've tried your solution, but I've a problem with it.
I've set the average to 20 base on the tic with the lowest peak, and in one tic we've for example this [19,12,15,21,0,10,5,22], the counter count 2 times. There are tics which cross the average many times and the counter count it all those times
You could get something like the black line in your second figure by keeping a running average of the absolute value of the samples. A running average length on the order of 0.1 second / sample_period is what you've drawn.