arduino average analog input


I'm new @ arduino, and the sky is the limit with Arduino :D

My project is reading a analog value, print this on the SD card and show it simple on the website. ( this is with a eth shield ).

My code is simple:

void loop()


  val = analogRead(analogPin);    // read the input pin

  Serial.println(val);             // debug value


This is a short example how i start it.. ( I add more lines with code with succes )

My question: measure the value every second for One minute, then write the value to the SD card, and show it on my website.

How can i to this :/

Best regards.

try the "datalogger" example (found in 'SD')