Introduction: Circuit With One LED & Potentiometer
The LED will turn on when the potentiometer is between 2 values. It will turn off otherwise. The Serial monitor in the Arduino IDE app will continuously print the value of the potentiometer.
Supplies
The circuit uses:
- 1 LED
- 1 potentiometer
- 1 330 ohm resistor
- Elegoo UNO R3 microcontroller board
- Breadboard
- Laptop
- USB cord
Step 1: Install Arduino IDE
Go to https://www.arduino.cc/en/software
Step 2: Connect the Microcontroller Board to Laptop
Use a USB cord to attach the Elegoo board to your device.
Step 3: Attach the LED
Connect one wire from pin 9 to the resistor, then connect the resistor to the LED. Then use another wire to connect the LED to ground.
Step 4: Attach the Potentiometer
Put the potentiometer on the breadboard. The left wire goes to power (5V). The right wire goes to ground.
Step 5: Add the Knob to the Potentiometer
Use another wire to connect the bottom of the potentiometer to A2. Finally, add the the knob to the potentiometer.
Step 6: Write the Program
https://github.com/tejbho/ArduinoProjects/blob/main/potentiometer/potentiometer.ino
Attachments
Step 7: Test the Circuit
Turn the knob on the potentiometer until the LED light turns on. The light should turn on when the value is between 2 and 3. Then turn the knob back to see that it turns off.





