Thursday, May 6, 2021

Fading LED (PWM) Project through Arduino

 


Fading LED is not a Tough or critical Project but its application are very important. my means we can control LED for decoration lights and we can use same application for to control BJT conduction level unconditional as well conditional which's useful in some other projects. We can control the speed of DC motor also.

Circuit diagram:  


Its Proteus view but fading of LED simulation is not good in Proteus you should use PICSimLab Software or implement it practically.
PICSimLab:

// www.Elekronicsgarage1.blogspot.com //

int ledPin = 9;    // LED connected to PWM based digital pin 9

int fadval = 0;   // fading start value

void setup() {

  // nothing something in setup

}

void loop() {

  // I am fading from mini to max

  for (fadval = 0 ; fadval <= 255; fadval =fadval+5) // Start from; max; increasing step

  {

    analogWrite(ledPin, fadval);

    delay(50); // delay of 50ms in dimming effect

  } }

If you like my post then share and like it 

and if you have any question then comment me

No comments:
Write comments

I am very thankful for your precious time

Important Artical

Popular Articals

Total Page views in This Month

© 2019-20 Electronics Garage. Designed by Uzma 0101 & Distributed by elektronicsgarage1.blogspot.com