Problem about Smart-home Arduino Programming

Hello guys I am new to arduino program and recently I encounter problem when functions in a smart-home combined together. Hope all of you can give me a helping hand :)

I want to communicate between smart-home (Arduino) and Smart phone (Android) and the following are part of my code:

void setup()
{
    Serial.begin(9600);   
    pinMode(ledpin, OUTPUT);                   //set pin 10 as output LED
    pinMode(motionpin, INPUT);                 // set pin 2 as input sesnor
    pinMode(Buzzer, OUTPUT) ;                  // set pin 9 as output  buzzer
}
void loop()
{
   if(Serial.available() > 0)          
   {

      data = Serial.read();  
     ledintensity = Serial.read();               //read the data from smartphone (LED brightness control) 
     Serial.println(ledintensity);
     analogWrite(ledpin,ledintensity);       // control the brightness (I want this to be instantly)
}
   temp = analogRead(tempPin);            //read the temp sensor on the breadboard
    temp = temp * 0.48828125;              //calculate temperature
    Serial.print("Temperature = ");
    Serial.print(temp);
    Serial.print("*C");
    Serial.println();
    delay(1000);                                   //the delay make me fail to control LED brightness instantly!
}

From the above coding, I want to control the LED light intensity by sliding the slider (from 0-100%) and I am using App Inventor 2 to build the app. At the same time there is a LM35 temperature sensor on the breadboard and record the temperature and output it on my Android phone 's screen. The problem is the byte sending out from the smartphone following the delay at the end of the arduino code [dealy (1000);] which is too slow and the LED can just change the intensity with lots of delay. But I don't really want to set down the delay value or the temperature value with keep updating every moment. How can I deal with this problem guys? Please I want instantly LED light control while my temperature value will not update so fast, is this possible? thank you very much! And sorry for my bad English.