LED not turning off

Hi friends, i'm currently working on a RFID Door access project, and i'm having trouble to off the pin "no". i tried different pin numbers. but it does not turn off. can anyone help me please?

thanks

#include <SoftwareSerial.h>
SoftwareSerial RFID(2, 3); // RX and TX

#define PIN_SCE 11
#define PIN_RESET 12
#define PIN_DC 10
#define PIN_SDIN 9
#define PIN_SCLK 8

#define LCD_C     LOW
#define LCD_D     HIGH
#define LCD_X     84
#define LCD_Y     48

int data1 = 0;

int yes = 9;
int no = 5;
int buzzer = 6;



void setup()
{
  pinMode(yes, OUTPUT); // for status LEDs
  pinMode(no, OUTPUT);
  
    digitalWrite(no, LOW);
}


void loop()
{

}

How is the LED wired?

AWOL:
How is the LED wired?

i'm not sure what you mean :sweat_smile: but ;

pin 5 -> resistor -> LED -> GND of arduino

That's what I meant; I asked because you could have had the LED wired to +5V via the resistor.

You're sure it's digital pin 5 and not A5?
have you always used a resistor?

OH! i found it. I misread actually, it's actually connected to +5V instead of GND!

Thanks mate.

hanish:
OH! i found it. I misread actually, it's actually connected to +5V instead of GND!

Thanks mate.

You must also have connected the LED backwards, in that case, because if the cathode, which is meant to go to ground, is tied to the +5v rail then it is in reverse polarity and will never light.

sirius631:
You must also have connected the LED backwards, in that case, because if the cathode, which is meant to go to ground, is tied to the +5v rail then it is in reverse polarity and will never light.

yes it was connected backwards. i had to swap polarity when i found that it was connected to +5V, and not GND. it was a breadboard confusion.