priyanshukhanra
Published © GPL3+

Blinking while changing brightness of led

Brightness CHANGER

BeginnerFull instructions provided103
Blinking while changing brightness of led

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Resistor 100 ohm
Resistor 100 ohm
×1
5 mm LED: Red
5 mm LED: Red
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

img_20221218_141132_V3MGOHHaX7.jpg

Code

CODES FOR THE PROJECT

Java
int pin=9;
int brightness1=5;
int brightness2=100;
int brightness3=255;
int del=500;
void setup() {
  // put your setup code here, to run once:
pinMode(pin,OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
analogWrite(pin,brightness1);
delay(del);
analogWrite(pin,brightness2);
delay(del);
analogWrite(pin,brightness3);
delay(del);
}

Credits

priyanshukhanra
0 projects • 1 follower

Comments