Parkmoonsugledel
Published © MIT

Adjusting LED Brightness With Variable Resistance

The next part to learn is variable resistance!

BeginnerProtip12 minutes3,034
Adjusting LED Brightness With Variable Resistance

Things used in this project

Story

Read more

Schematics

LED Schematics

So..So..

Code

LED Variabler resistance

Arduino
Slowly ..
const = int Variabler = 0;
const = int led = 13;

void setup() {
  Serial.begin(9600);
  pinMode(LED, OUTPUT);

  
}

void loop() {
  int reading = analogRead(Variabler);
  Serial.println(reading);
  delay(500);
  int change = map(reading, 0, 1023, 0, 255);
analogWrite(led, change);  
}

Credits

Parkmoonsu
1 project • 6 followers
A Korean high school student who wants to learn about Arduino!
Contact
gledel
100 projects • 116 followers
Looking back on my childhood, I was happy when I was making something and I was proud of myself. "Making is instinct!"
Contact

Comments

Please log in or sign up to comment.