Strange behavior with LM35 + DHT11 + LDR

Hello, I am trying to debug what’s wrong with my arduino circuit so i decided to buy new sensors and arduino and leave the strange behaving arduino and try on a new one, but the result is the same.

What i’m trying to do is quite simple, read light value + temperature and humidity with DHT11 + read temperature with LM35 sensors.

The strange behavio disappears if i comment out the part of code relative to reading the light sensor.

Here is my code :

/*
 * test lm35 + dht11 + ldr
 */

#include <dht11.h>            // Include la libreria per la gestione del sensore temperatura ed umidita DHT11 
#define DHT11_PIN A2          // pin di lettura dati del sensore DHT - Analogico2
dht11 DHT;         
int umid_dht, temp_dht;       // variabili per sensore DHT


const int sensoreluceIn = A1;
int valore_luce = 0;


const int LM35In = A0;
int RawValue= 0;
int Voltage = 0;
int tempC = 0;

void setup(){  
  Serial.begin(9600);
  pinMode( sensoreluceIn, INPUT);
  
}


void sensore_luce() {

  String descrizione_luce;
  valore_luce = analogRead(sensoreluceIn);     

                 if (valore_luce < 10)  descrizione_luce = "Buio";
            else if (valore_luce < 200) descrizione_luce = "Luce debole";
            else if (valore_luce < 500) descrizione_luce = "Chiaro";
            else if (valore_luce < 800) descrizione_luce = "Luce";
                                    else descrizione_luce = "Molta luce";
         
  Serial.print("C'e' " );
  Serial.print(descrizione_luce);
  Serial.print(" Valore : ");
  Serial.println(valore_luce);      
  delay(1000);
  descrizione_luce="";

}


void temp_esterna() {

  RawValue = analogRead(LM35In);
  Voltage = (RawValue / 1023.0) * 5000; // 5000 to get millivots.
  tempC = Voltage * 0.1; // 500 is the offset
  Serial.print("Temperatura esterna : ");
  Serial.println(tempC,1);
  delay(500);  
}


void dht_interno() {

 int chk;
  chk = DHT.read(DHT11_PIN);                // legge il valore del pin DHT11 per temp interna
 
  switch (chk){
    case DHTLIB_OK:  
                //Serial.print("OK,\t"); 
                 umid_dht = DHT.humidity;                  // legge il valore dell'umidita' interna e la memorizza nella var. umid_dht
                 temp_dht = DHT.temperature;               // legge il valore della temperatura interna e la memorizza nella var. temp_dht
                 Serial.print("Temperatura interna : ");
                 Serial.print(temp_dht);
                 Serial.print("  Umidita interna : ");
                 Serial.println(umid_dht);
                break;
    case DHTLIB_ERROR_CHECKSUM: 
                //Serial.print("Checksum error,\t"); 
                break;
    case DHTLIB_ERROR_TIMEOUT: 
                //Serial.print("Time out error,\t"); 
                break;
    default: 
                //Serial.print("Unknown error,\t"); 
                break;
  
              }
 delay(2000);                              // necessario attendere questo tempo tra una lettura e un'altra del sensore
}

void loop(){
sensore_luce();
dht_interno();
temp_esterna();  
}

if i comment out the sensore_luce(); from the void loop then everything works correclty but if i uncomment it, the initial readings for the LM35 sensor are ok , then every reading is greater and then drops down less than what it would have to be and then up again!

The LM35 and DHT11 sensor are keyes so they are just connected directly to GND, VCC, DATA
The LDR instead is connected using a 10K resistor between GND and the LDR
LDRDataPin–>LDRSensorLeg1–>10KResistor–>GND
LDRSensorLeg2 → VCC

Can anyone help?

THanks.

Ok, i found this and seems to have solved my problem : http://forum.arduino.cc/index.php?topic=137760.0

Fixed my own problem. I simply connected a 10uf capacitor between Gnd and the Analog pin to act as a filter and this cleared up the problem.

Hope this helps someone else.