startup with analogwrite function

Hi,

i am new in the forum and i have not found an answere on my question right now.

i want to use the analogwrite function to dim a led.

everything is fine, but the pin output starts with the high value and not with the lowest value.

code:
void setup (
Pinmode (3, Output)
)
void loop (
Analogwrite (3,100)
)

Before the led has a lower brightness, it starts with the maximum brightness.

how can i set the pin, that the led starts with the lowest brightness before getting the dimmed value?

thank you for your help.

have a nice time.

kind regards
rumble

Rumble2006:
how can i set the pin, that the led starts with the lowest brightness before getting the dimmed value?

void setup (
  analogWrite(3, 0);  // Start at 0 brightness
// Note: The first line in analogWrite(pin,brightness) is "pinMode(pin, OUTPUT);"
)
void loop (
  analogWrite (3,100);
)

Hi johnwasser,

thank you very much.

Sometimes it fails on the simple things.

Bye.