Rotary encoder + 7 segment display.

I have tested with = and ==. But it nothing changes.

With ==

void loop()
{

  
   if (encoder[1].count == 1)
    {
     digitalWrite(LEDPin, HIGH);
    }

   if (encoder[1].count == 0)
    {
     digitalWrite(LEDPin, LOW);
    }


   if (updateEncoders()) printEncoders();

}

The same. LED is always ON.

("+" LED is connected by 220R to 5VCC, "-" to 12 pin.)

Fixed

void loop()
{

  
   if (encoder[0].count == 1)
    {
     digitalWrite(LEDPin, HIGH);
    }

   if (encoder[0].count == 0)
    {
     digitalWrite(LEDPin, LOW);
    }


   if (updateEncoders()) printEncoders();

}

First encoder is "0", not "1".