my code not running as i expected for two analog sensor

Hello Everyone,

I am doing one project on arduino smart iot agriculture with blynk IoT platform. where i am interfacing two sensor 1 nos. temperature sensor (LM35) and 2nos. moisture sensor both are analog sensor. Step one i am interface both sensor one by one programming ok working fine, but when i marge both program it running but value changes continuously. for that i define both separate function and compile, but after that same problem happen with program please guide.

code :-

#include <Servo.h>
int val;
Servo sg90;
int servo_pin = 11;
int LED = 2;
void setup()
{
Serial.begin(9600);
pinMode(LED, OUTPUT);
sg90.attach(servo_pin);
}

void loop()
{

Serial.println();
val = analogRead(A0);
Serial.print(val);
delay(1000);
float mv = ( val/1024.0)5000;
float cel = mv/10;
float farh = (cel
9)/5 + 32;
Serial.print("TEMPRATURE = ");
Serial.print(cel);
Serial.print(" *C");
Serial.println();
delay(1000);

if( cel>= 26 )
{
sg90.write(180); // moving the servo at 180 degrees
delay(100);
}
else
{
sg90.write(0); // moving the servo at 0 degree
delay(1000);
}
moisture();
}

void moisture()
{

float mp;
int sensor_analog;
Serial.println();
sensor_analog = analogRead(A1);
mp = ( 100 - ( (sensor_analog/1023.00) * 100 ) );
Serial.println();
Serial.print("Moisture Percentage = ");
Serial.print(mp);
Serial.print("%");
delay(1000);
if( mp <= 50 )
{
digitalWrite(LED, HIGH);
}
else{
digitalWrite(LED, LOW);
}

}

temperature_interface.ino (1.05 KB)

but when i marge both program it running but value changes continuously.

which value changes? temperature or moisture

why do you have so many delays? maybe just one 1 second delay at the end of loop() to slow down the prints