Hackster is hosting Impact Spotlights highlighting smart energy storage. Start streaming on Thursday!Stream Impact Spotlights on Thursday!
KRIVANJADIYables
Published © GPL3+

Working with a Potentiometer and an LED

Use of a potentiometer to control brightness of an LED.

BeginnerProtip34,039
Working with a Potentiometer and an LED

Things used in this project

Story

Read more

Schematics

Circuit Diagram

Schematic Diagram

Breadboard Diagram

Code

Code

Arduino
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);
}

Credits

KRIVANJA

KRIVANJA

37 projects • 52 followers
www.krivanja.dev
DIYables

DIYables

0 projects • 78 followers
I would like to invite you to join and add your projects to DIYables platform https://www.hackster.io/diyables

Comments