PaulRB:
Naashi, I don't understand what it is that is not as per requirement.
Means red and yellow should have fix delay but the delay time should increase or decrease with push button.
PaulRB:
Naashi, I don't understand what it is that is not as per requirement.
Means red and yellow should have fix delay but the delay time should increase or decrease with push button.
naashi:
Means red and yellow should have fix delay but the delay time should increase or decrease with push button.
That does not make sense. Either the delay is fixed or it increases and decreases. Do you mean the red & yellow delays should be fixed and the green should increase ad decrease? If so, that is what is happening, or would be if you did not have delay() in your code, which stops the button presses from being detected.
PaulRB:
That does not make sense. Either the delay is fixed or it increases and decreases. Do you mean the red & yellow delays should be fixed and the green should increase ad decrease? If so, that is what is happening, or would be if you did not have delay() in your code, which stops the button presses from being detected.
Ohh sorry for my bad english. I meant the same you said. red and yellow should have fix time but the green should have adjustable time with the help of a push button.
Ok naashi. I think it is working now. But you can only press the button while the green led is on, is that correct?
Like i said, using delay() stops the Arduino from checking that the button is pressed. You must remove all use of delay() so that the Arduino can check the button at all times.
But to do that, you must find another way for the sketch to remember which led is currently lit and which led is next in the sequence.
Try to change the sketch to do that.