Introduction
- Arduino Uno
- Potentiometer
- BreadBoard
- HookUp Wires
- LED
Connection
Step 1: Connection from Potentiometer to Arduino Uno.
- Take the first pin of a potentiometer connected to the Gnd of the Arduino Uno.
- Take the second pin of Vin connected to the analog pin of A0 to Arduino Uno.
- Take the Third pin of Vcc to the 5v of Arduino Uno.
Step 2: Connection from LED to Arduino Uno.
- Positive pin = 09
- Negative pin = Gnd
Programming
- const byte POTENTIOMETER = 0;
- const byte CONTROL = 9;
- int reading;
- int value;
- void setup()
- {
- pinMode(CONTROL, OUTPUT);
- }
- void loop()
- {
- reading = analogRead(POTENTIOMETER);
- value = map(reading, 0, 1024, 0, 255);
- analogWrite(CONTROL, value);
- }
Explanation
- When we adjust the potentiometer the LED /Fan can be controlled.
- When the potentiometer is scrolling the brightness of the LED can be High/LOW.
- When the potentiometer is scrolling the Speed of the Fan also changes.
Output

Figure 1: Output
Read more articles on Arduino:


Delpin Susai RajTOP 100Posted Aug 28, 2016, 12:35 AM EDT
Nice
Gowtham KTOP 100Posted Feb 20, 2016, 7:13 AM EST
Good One
Kumaresh RajalingamPosted Feb 19, 2016, 11:38 PM EST
thank you sibeesh sir
Kumaresh RajalingamPosted Feb 19, 2016, 11:37 PM EST
thank you Gul Md Ershad sir
Kumaresh RajalingamPosted Feb 19, 2016, 11:37 PM EST
thank you santhakumar sir
Kumaresh RajalingamPosted Feb 19, 2016, 11:36 PM EST
thank you Mohammed sir
Kumaresh RajalingamPosted Feb 19, 2016, 11:35 PM EST
Thank you hemant sir
Kumaresh RajalingamPosted Feb 19, 2016, 11:34 PM EST
Thank you karthiga madam
Kumaresh RajalingamPosted Feb 19, 2016, 11:34 PM EST
Thank you Shubham sir
Santhakumar MunuswamyPosted Feb 19, 2016, 9:04 PM EST
Thanks for nice work
Former memberPosted Feb 19, 2016, 8:55 PM EST
good concept
Sibeesh VenuTOP 100Posted Feb 19, 2016, 8:39 PM EST
Nice Share
Shridhar SharmaPosted Feb 19, 2016, 6:44 PM EST
nice share
Mohammed IbrahimPosted Feb 19, 2016, 9:46 AM EST
nice
Hemant SrivastavaPosted Feb 19, 2016, 4:52 AM EST
Good One
Sr KarthigaPosted Feb 19, 2016, 12:42 AM EST
Nice Explanation
Sr KarthigaPosted Feb 19, 2016, 12:42 AM EST
Good one
Shubham KumarPosted Feb 18, 2016, 9:03 PM EST
nice one