Delay Problems

I made a project in which when we say in smartphone it displays that in LCD Display with scroll. Now I want to clear lcd after some time say 3 minutes or when another input comes.

So i Will use lcd.clear(); but problem is if I clear lcd i cant scroll, and if I delay then Clear, the LCD will Scroll each letter with that delay which will be too slow. So what can I do? Here's The Code of that part.

if (voice.length() > 0) { digitalWrite(disco, HIGH); Serial.println(voice); //lcd.clear(); lcd.setCursor(15,0); lcd.print (voice) ; lcd.scrollDisplayLeft(); delay(520);

//lcd.clear(); }

If I remove these // comment slashes, it wont scroll because it cleares that moment.

So what can I do? Either for time (3 minutes ), or another input (when said from smartphone)

Why do you want to clear the LCD when there is data in the voice object?

There must be some way to clear the data from the voice object. Use that method, so voice.length() is no longer positive.

I don't understand what you are trying to do but have a look at how millis() is used to manage timing without blocking in Several things at a time.

...R

PaulS: Why do you want to clear the LCD when there is data in the voice object?

There must be some way to clear the data from the voice object. Use that method, so voice.length() is no longer positive.

Thanks, But What I am saying displays in the LCD , so when I said the first command it goes ok. As soon as the second command comes, the lcd should clear, as to not overwrite the letters. I can't use Voice length function for no more positive because it should be displayed for a time, still I'm Trying

Robin2: I don't understand what you are trying to do but have a look at how millis() is used to manage timing without blocking in Several things at a time.

...R

Okay , Thanks A lot, shall update if I am unable to do it! World would be great if there are all people helping and learning. Thanks :)

nityoday: World would be great if there are all people helping and learning. Thanks :)

We are trying.

...R

PS. I know that is an ambiguous statement :)