Arduino Tutorial 29: Using Push Buttons to Create Dimmable LED

In this lesson we show you how to create a Dimmable LED using two pushbuttons. Pressing one button will gradually increase the brightness, while pressing the other button will gradually decrease the brightness. The project also includes an active buzzer to provide the user feedback that either maximum or minimum brightness have been reached. I encourage you to try and build this yourself before watching the video. Then see if you can do it on your own, and then see if you are doing the way I do it, or if you find an alternative suitable solution.

If you want to follow along at home, you can order the Arduino Kit we are using HERE.

Below is the code we used to achieve the toggle operation. The video gives details on how to connect up the circuit.