Takes the average of a set number of values from a sample. The index of the set then increments, and a new average is calculated. In this way, the average of the last n numbers is read continuously.