-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added a delay after switching relay (#4474)
- helps to stabilize power on the LEDs before sending data
- Loading branch information
Showing
1 changed file
with
1 addition
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -375,6 +375,7 @@ void handleIO() | |
if (rlyPin>=0) { | ||
pinMode(rlyPin, rlyOpenDrain ? OUTPUT_OPEN_DRAIN : OUTPUT); | ||
digitalWrite(rlyPin, rlyMde); | ||
delay(50); // wait for relay to switch and power to stabilize | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
DedeHai
Author
Collaborator
|
||
} | ||
offMode = false; | ||
} | ||
|
Not a good approach IMO. This will add 50ms delay in everything WLED does within loop().
True, this will only happen on power on but I still think adding delay() is inappropriate in a multitasking approach WLED has.