simple LED circuit is not working

Hi all,

I was trying to light up LED using arduino where my circuit is connected as below.
But the LED does not light up, even I have change the orientation.
I am using a 220ohm resistor, digital pin 7 and my code is:

const int LEDPin = 7;

void setup() {

Serial.begin(9600);//initialize serial window

pinMode(LEDPin,OUTPUT);

}

void loop() {

digitalWrite(LEDPin,HIGH);
}

I am not sure what is wrong with my circuit, perhaps the electronics components is faulty??

Turned the LED the wrong way?

i try to turn the LED orientation, still not working

Try moving the resistor from pin 7 to the 5V pin. If it doesn't light up then the LED is faulty. It does happen.

Steve

Also the breadboard could be not working correctly on the row you are using. Try moving it to a different row.

This too happens.

Check the pins of the LED before testing things. Wrong polarity might be bad for it.

Don’t worry about that - the led being in backwards will not come to any harm at these voltages