COMPONENTS AND SUPPLIES
Arduino UNO | × | 1 | ||
Breadboard (generic) | × | 1 | ||
Single Turn Potentiometer- 10k ohms | × | 1 | ||
LED (generic) | × | 1 | ||
Resistor 1k ohm | × | 1 | ||
Jumper wires (generic) | × | 1 |
APPS AND ONLINE SERVICES
ABOUT THIS PROJECT
Abstract
- This project demonstrates working with a potentiometer.
Also visit here.
Objective
- To control the brightness of a LED using potentiometer.
https://www.youtube.com/embed/jzSYn3A_l_M?rel=0Working with a Potentiometer
CODE
CodeArduino
const int analog_ip = A0; const int LED = 3; int inputVal = 0; void setup() { pinMode (LED, OUTPUT); } void loop() { inputVal = analogRead(analog_ip); analogWrite (LED, inputVal/4); delay(100); }
SCHEMATICS
Circuit Diagram

Schematic Diagram

Breadboard Diagram

Recent Comments