Different brightness,

Hi! I am currently trying to make 2 LEDs work at the same time, but I am having difficulties that one of the LEDs is very bright but the other side is not as bright as the one that's very bright. I have coded it well and I am wondering if it is either my coding or my bad wiring.

If you know a solution or how to fix the problem please tell me how!

Thanks!

This is my code

void setup()
{
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);
  digitalWrite(10,HIGH);
  digitalWrite(11,HIGH);
  
}
void loop()
{
  digitalWrite(9, HIGH);
  digitalWrite(8, LOW);
  digitalWrite(13, LOW);
  digitalWrite(12, HIGH);
  analogWrite(10,255);
  analogWrite(11,255);
  if (analogRead(A1) > 850) // This is the Left Sensor
  {
    digitalWrite(8, LOW); // Stops the Right motor from moving
    digitalWrite(9, LOW);
  }
  else
  {
    digitalWrite(9, HIGH); // Makes the Right motor move foward
    digitalWrite(8, LOW);
  }
    if (analogRead(A3) > 850) // This is the Right Sensor
    {
      digitalWrite(13, LOW); // Stops the Left Motor from moving
      digitalWrite(12, LOW);
    }
    else
    {
      digitalWrite(13, HIGH); // This makes the Left motor move foward.
      digitalWrite(12, LOW);
    }
  }

Post a wiring diagram.

What do the “motor” comments have to do with anything and why is this code included? Please post the minimum program that demonstrates the problem.

It would make it much easier if you had put in comments telling which outputs were for the LEDs.

Also, how do you have the LEDs connected, and are they identical to each other, or different types/color/brand/etc? Different colors will often vary in brightness.

david_2018:
It would make it much easier if you had put in comments telling which outputs were for the LEDs.

No, it would make it much easier if the OP had used pin names that described what they did.