Pages: 1 [2]   Go Down
Author Topic: problem fading and blinking leds simultaneously with millis  (Read 1429 times)
0 Members and 1 Guest are viewing this topic.
Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

And to further try to help you understand the problem, the delay(50) I suggested was merely to illustrate that your LEDs are in fact blinking on and off in sequence, and not all at once.  So if you remove that delay you will once again get what would appear to be a smooth fade on pin 10, however that's merely an illusion.  Because of your for loop, the fade gets interrupted every 13 cycles.

You should rethink how you're delaying the blinking and not interrupt the fade at the same time.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i totally get it.
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome.  Work on it a bit, and post your findings.
Logged

Pages: 1 [2]   Go Up
Jump to: