Connect the LED to PWM pin (e.g., D9) through a resistor. Connect the middle pin of the potentiometer to A0. Connect the other two potentiometer pins to 5V and GND. The potentiometer sends an analog ...
This is an easy tutorial showing how you can control the brightness of an LED or adjust the speed of a DC fan using Arduino Board, a small BC547 transistor and a potentiometer. In my example the whole ...
Where pin is the number of the PWM capable pin you want to write to, and value is the duty cycle between 0 (always off) and 255 (always on). Explain why 0 volts corresponds to 0 and 5 V corresponds to ...