void setup()
{}

unsigned int x0=0,x1=0,x2=0,y=0;

// Hanning filter

// we know AD only gives positive
// y = 0.25(x0 + 2*x1 + x2)
void loop()
{
  x2 = x1:
  x1 = x;
  x = analogRead(0);
  y = (x+ 2*x1+x2) >>2; // div 4
}
