Problem in my arduino?

hi,

i wanted to make a simple project that catchs the heat and the light via light and heat sensors

i tested the heat sensor it worked perfectly

i tested the light it was good too

but then when i compined them both so the arduino reads this and that , it reads the light sensor right

but reads the heat sensor wrongly?

i attached my voltameter to the heat sensor it got the right reading but still my arduino is reading it wrongly! so i removed the light sensor reading from the code and surprisngly the heat reading came back again as in the right way!  but when i attach the code of the light sensor puff the reading of the heat sensor goes crazy except the very first reading comes right! the first reading goes 20 and thats the rigt thing next it swings from 10 to 40 ? whats the problem? thats my code

int lightsensor=0;
int heatsensor=5;
//int lightled=2;
//int coldled=3;
//int hotled=4;
//int hot=30;
//int cold=15;
//int fan =5;
//int previoustime=0;
//int interval=1000;

 void setup(){
//  pinMode(lightled,OUTPUT);
//  pinMode(coldled,OUTPUT);
//  pinMode(hotled,OUTPUT);
//  pinMode(fan,OUTPUT);
  Serial.begin(9600);
 }
 void heat(){ 
   int heatreading=0;
   int heatvoltage=0;
   int degree=0;
   heatreading=analogRead(heatsensor);
   heatvoltage=map(heatreading,0,1023,0,5000);
   degree=heatvoltage/10;
   Serial.print("Degree = ");
   Serial.print(degree);
 }
 void light(){
   int light=0;
   int lightvolt=0;
   light=analogRead(lightsensor);
   lightvolt=map(light,0,1023,0,5000);
   Serial.print(" , lightvoltage = ");
   Serial.print(lightvolt);
 }
 void loop(){
   heat();
   light(); <<<< when i remove this it just gets the heat reading perfectly
   Serial.println();
   delay(500);
  
 }

but as long as i call for light it swings like i said?

any idea? ty

 

guys i think its a static

guys i think its a static problem when i connect the light sensor to the grund the heat sensor reads correctly

but how to fix the static problem without interrfereing with the voltage?