Quote:
Originally Posted by John_1102
My mentor explained to me this way.
Your first 9 values are going to be very skewed so wait until you have at least 9 values in your array before you start averaging. Now counter is a pointer variable it ONLY points to a position in the array. I add all the values and get an average every time after 9 samples. I haven't tested changing speeds yet. Only constants.
|
Your code as written doesn't do what you described above. That was the point of the two responses (post#28 & post#29) to your post#27.
Show your code to your mentor and ask him.