Implemenation of Length N Moving average filter using block covolution algorithm(overlap and save algorithm)
in psudo pyhon code
const tail = 5  

'inside loop where you feed it values

list.push(entry)
list.rotate.left(1)
if len(list)&gt;tail list.pop()
avg = sum(lst) / len(lst)
print avg