Hi Ben,
your answer is the just one I'm looking for. But i still have a slight problem. for the part on setting the element to the 1st reading above the threshold, i don't seems to have it right, as there are times that the value i've set, is not inside the array, so the returned value is 0 or index -1.
Is there a proper way to set the threshold? i am now using another way by using using the maximum value of the array as the element and using index 0 as start, and the index output multiple by the delta time, i assume it as the time i am looking for, but i am not very sure. please advice, thank you.
sincerely,
Garry