... and the reason your code didn't work when you replaced the delays with millis() is because you are only checking the times once... the code needs to be in a loop.
... and the reason your code didn't work when you replaced the delays with millis() is because you are only checking the times once... the code needs to be in a loop.