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 ...
// the LED has to be connected to PWM digital pin // since LED connected to PWD pin accepts value between 0-255 and potentiometer provides value between 0-1023 we have to divide the value coming from ...
Reads an analog input on pin 0, converts it to voltage, and prints the result to the Serial Monitor. Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu). Attach ...