Recent Changes - Search:

Video Sites

NCECAYoutubeIndex not maintained

Thai

w0it

pmwiki.org

edit SideBar

FadeUpDown

/* FadeUp Hook LED with ballast resistor from pin 11, a Pulse Width Modulation capable pin to Ground. Put the negative in the ground.

  • /

int LEDoutput? = 11; // pin the LED is hooked upto void setup() {

  // put your setup code here, to run once:

pinMode(LEDoutput?, OUTPUT); // allows the LED pin to output voltages. }

void loop() {

  // put your main code here, to run repeatedly:
  for (int x = 0; x< 256;x = x+1){ //counts up by one each time through "loop"
  analogWrite(LEDoutput?,x);// sets the PWM level or duty cycle to x
  delay (5);
  }
  for (int x = 255; x> 0;x = x-1){ //counts up by one each time through "loop"
  analogWrite(LEDoutput?,x);// sets the PWM level or duty cycle to x
  delay (5);
  }

}

Edit - History - Print - Recent Changes - Search
Page last modified on November 16, 2021, at 12:37 AM