PRE-SET Brightness of LED

Hello, everyone.

I am quite new using Arduino.

I have 3 LEDs that go in sequence. However, when they light up they are in the brightest mode. I want them to be a little bit dimmer. Could you please let me know how I can pre-set brightness of LED in my code. I do not need any fading in / fading out effect.

This is the code:

int LED1 = 13;
int LED2 = 12;
int LED3 = 11;

void setup() {
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
}

void loop() {
digitalWrite(LED1, HIGH);
delay(800);
digitalWrite(LED2, HIGH);
delay(800);
digitalWrite(LED3, HIGH);
delay(800);
digitalWrite(LED1, LOW);
delay(800);
digitalWrite(LED2, LOW);
delay(800);
digitalWrite(LED3, LOW);
delay(800);
}

The brightness of standard LEDs is controlled with a series resistor or you can use PWM, i.e. turning a output on/off at a very fast rate. The Arduino has build in PWM on some pins, this is controlled with analogWrite()

You can use one of the PWM outputs to drive a avalanche protected N-Channel MOSFET With the source to ground, the gate to one of the PWM pins and the drain to the cathode of the LEDs. Set the PWM during setup and forget it. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

Just change the series to one with a higher value. What value do you have at the moment?