You said you want to calculate average of eight. Did you get that done? How did the gain vs. frequency look like?
You also said that you used mathlab to design a low-pass filter. What are the filter coefficients? How did the gain vs. frequency look like?
If there is no one that pulls your strings, then it must be yourself that is pulling our strings to do all sorts of elementary things for you. (Such as changing size of an array from 1000 to 500, divide an integer by 8, and count to 1 second using a 2ms timer.)