Around delay

Hi

I have a ondelay on my output but I wont it to start with out delay on another input but how can I get it to do that?

Br Kasper

    if(tempc > 200 and not digitalRead(niveau)and state == HIGH)
    delay(5000);

{
digitalWrite(ventil,1); 
}
    if(tempc < 200 or digitalRead(niveau)or state == LOW)
    {
digitalWrite(ventil,0);

}

Take a look at Using millis() for timing. A beginners guide, Several things at the same time and the BlinkWithoutDelay example in the IDE

Also look at my tutorial How to Write Timers and Delays in Arduino
It includes an example of Delay execution until condition has been true for X secs which might be just what you are looking for.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.