Newbie's first code: Sensor smoothing in 762 bytes

I used this in my code to smooth out peaks :-

//*********************************************************************
//              Averaging Read From Port
//*********************************************************************
long readAnalogAVE(int Port, int Samples) {

     long Accumulator = 0 ;

     for (int i = 0; i < Samples ; i++) { 
          Accumulator = Accumulator + analogRead(Port); 
     }  
     return(Accumulator / Samples) ;
}

so in your case cou could call it with :

Light = readAnalogAVE(5,10) ;

I found it was better in a function as different sensors need different number of samples!