State variables and millis help.

bance:
Perhaps, we could leave that aside for a moment (I'm a little frustrated.) As far as I can see it, the concept of using Millis() as a timed delay, works like this:-

We issue a variable "A" with a timestamp (Millis()), next we issue another variable "B" with a later timestamp (+Millis()), ...

Steve-

I know that the BlinkWithoutDelay uses two variables but I believe this really only needs one.

The "later timestamp" is currentMillis in the BlinkWithoutDelay example but I never understood the logic of having a variable called currentMillis because as soon as it's assigned a value it's no longer current! (a bit of an oxymoron I think)

Why not simply compare against the output of millis() itself? By definition, you can't get any more current than that.

Just a thought.

Regards,

Brad
KF7FER