Millis() Problem!

larryd:
if (millis()>=LampEnd){

Once millis() is > LampEnd, when will it be < LampEnd?

Hi, those were used in two different scenarios... (sketches versions)
the fist one:

while millis() <= LampEnd (witch have worked fine)

and the other (in other version)

if mills() >=LampEnd, Then... (that one didn't work)

DH12043:
try something like:

if (currentLampTime - startLampTime <= lampDelay) {

Thanks, but that doesn't work

I've find that the problem is that my currentTime and the startLampTime are the same.. so any comparison will be wrong.

I did a test using switch commands and works fine...

I read the resources you have mentioned but can't get it yet...

Anyway, thank you for your advices!