Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Why not make the change in hardware? Much simpler and no need to change any code. If you really don't want to, why not simply try putting maxbrightness/10 into the analog write for the second LED? You might have to change the variable to a float to do it in the approximately similar time (otherwise you'll only really change a value for the brightness of the second one approximately every 5 counts). Commented Nov 11, 2023 at 1:42
  • I'd like a code solution so it's easier to use it in another configurations. Also, if I just divide maxbrightness by 10, I am afraid the leds might get out of synch after some cycles. Commented Nov 11, 2023 at 16:28