I think the problem lies in the fact that you only store the first 10 samples in your sV array.
As soon as you have collected these 10 samples, you extract the min and max value, but you no longer update the array with new values...
1 Like