Fading the LED without turning it off.


hi, guys. i'm noob in arduino now.

i wonder, how can turn on led, using fade-effect. without turning off.

i use
code: [select]
int pwmpin = 10; // led in series 470 ohm resistor on pin 10

void setup()
{
}

void loop()
{
  (int i=0; <= 255; i++){
     analogwrite(pwmpin, i);
     delay(10);
  }
}


but, after fading in, led turnes off , fade in again , again , forever. , other commands in code(after for-commands) don't work. how prevent turning off, until 'analogwrite(pwmpin, 0)' command.

thank you.

if " " equals 0 or if required minimal voltage not met, turn off.


Arduino Forum > Using Arduino > Programming Questions > Fading the LED without turning it off.


arduino

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62