All submissions

LED Brightness Control Using PWM

Solving Approach:

How do you plan to solve it?

 

 

Code

/*Paste your code here*/
//Arduino Uno
void setup() {
  // put your setup code here, to run once:
  pinMode(9, OUTPUT);
}

void loop() {
  for (int i = 0; i <= 255; i++) {
    analogWrite(9, i);
    delay(8);
  }
  for (int i = 255; i >= 0; i--) {
    analogWrite(9, i);
    delay(4);
  }
}


 

Output

Video

Add video of output (know more)

 

 

 

 

 

Photo of Output

Add a photo of your hardware showing the output.

 

 

 


 

Submit Your Solution

Note: Once submitted, your solution goes public, helping others learn from your approach!