dynamic array? or varrying the size of the array based on something?

the frequencies i'm dealing with are much slower; from about 10hz-2000hz so i'd have to have a huge window for it to count in which would make the response of the output unuseable. the method i have works and with enough smoothing seems to work well.

i played with the variable sized index for a 8 space array and got it to work but i think my math is broke somewhere. i'll have to spend more time on it.

Graynomad:
PaulS commented on this

the ISR changes the position of itself in the array

You are now saying this

populating the various slots in the array. if i change the sample size it makes a difference.

Two totally different things.

eave the array with 8 spaces but at low speed only use the first 2 then at higher speed maybe 4 then highest speed use all 8. i'll have to try it but i think it'll work better than trying to reallocate memory

Sounds like a better plan.


Rob

i meant the latter; the isr changes the index position for the array or resets it to 0 if +1 is too many