Proof of concept: controlling the brightness of the LEDs using the potentiometers.
I just realized I wired them the wrong way btw lol. No worries, a few #defines and helper functions solve it, this is a common mistake, and I’m 99.9% sure the compiler is smart enough there’s no performance hit doing that.
Arduino pins cannot output a variable voltage: they output either 0V or 5V. The brightness is varied using Pulse Width Modulation (PWM): turning on and off repeatedly much faster than the eye can see.
Using a simple filter to smooth it over, we can turn a PWM wave into a variable voltage, that’s how I plan to output envelopes.