DigitalWrite not lighting up LED as bright as AnalogWrite

Hi guys, I usually use analogWrite() in my projects to light up an LED because digitalWrite() doesn't light the LEDs as bright. I wanted to know why. Thanks

Here's the code:

void setup(){}
void loop(){
digitalWrite(13, HIGH);
}

You have to define pin 13 as output in setup()

ok will it work?

yes
and remove the ; at the } of loop

ok sure

did you try?

yea
it didnt work

analogWrite and digitalWrite lights up 2 leds with different bright? Is this you actual problem?

Whatever that means :roll_eyes:

did do you set it as output? doesn’t look like you did

So post the digitalWrite() code with the suggestions applied. And post your code with an analogWrite() that lights the LED up brighter. We like to actually see what you've done.

Sure but I am going on a vacation so ill come back till december 13

Hello
Mostly it is highly recoemmented to start with the examples provided by the IDE.

Nope