Back to Parent

Getting Inputs

Combine a switch and potentiometer. The switch should turn on and off the light while the potentiometer will fade up and down the light (but only when its on).

The task for Getting Inputs is the combination of switch and potentiometer. The tricky part is that the potentiometer shall only work when the LED is on. In this case, I put the code chunk of potentiometer inside the if condition that the button state is low. The code and video are attached.


Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0