Tweet
Replying to @josecastillo
The crucial bit is that the buzzer depends on a frequency to work, and the LEDs depend on a duty cycle. As long as the buzzer’s frequency is faster than our eyes can see, we can let the buzzer pick any frequency it wants, and calculate the LEDs’ duty cycle as a fraction of that.
(original)