Averaging input from multiple input over a fixed amount of time (estimated)
This function will average readings on an analog pin, include it and use it in place of analogRead(...) and it should do what you want.

int aveAnalogRead(int pin, int ave=10, int delayms = 0)
{
    int tot = 0;
    for(int i=0; i&lt;ave; i++)
    {
        tot += analogRead(pin);
        if(delayms) delay(delayms);
    }
    return tot/ave;
}


in your loop():

for (int analogPin = 0; analogPin &lt; 6; analogPin++) 
{
   int sensor = aveAnalogRead(analogPin);
     &lt;&lt;do your work here&gt;&gt;
}