513Views1Replies

Author Options:

How do you make 2 LED's fade (PWM) consecutively on an Arduino? Answered

I want 2 LED's to fade one after another but i can't figure out the code yet. 

Tags:arduino

1 Replies

user
steveastroukBest Answer (author)2013-03-16

Both starting bright ?
Try this

analogWrite(led1,255);
analogWrite(led2,255);
for (int bright=255;bright>0;bright--)
analogWrite(led1,bright);
for (int bright=255;bright>0;bright--)
analogWrite(led2,bright);



Steve

Select as Best AnswerUndo Best Answer