Need some help!!

I went trying out my LED by connecting it to the 5V and the ground pin ( 2k ohm resistor is also present ). Suddenly, the LED was just flickering and died out. I was running one of my self-programmed 'reset' mode below. But how come this could happen?

void setup()
{
;
}

void loop()
{
;
}

Defective LED (?)

I dont think so

led plus resistor across 5 volt supply must glow unless :-

a) no 5 volts
b) resistor defective
c) led defective
d) led connected wrong way round
e) you just dreamt it
f) you just went blind

low5545:
I went trying out my LED by connecting it to the 5V and the ground pin ( 2k ohm resistor is also present ). Suddenly, the LED was just flickering and died out. I was running one of my self-programmed 'reset' mode below. But how come this could happen?

Whats your Forward Voltage and Nominal Current rating on your LED?

What led you to choose a 2K Ohm Resistor?

I have a feeling your LED might not be dead, you're just giving it only 1.4 milliAmps.

My money is on faulty wiring. Are you using solder less bread board? If so rattle the wires.

Now I knew why, I was trying to save my time. So I had connected it on a breadboard through the power pins ( most left and right side ) with a 2K ohm resistor. As we know, the breadboard connects power and ground vertically. Therefore adding a resistor is useless. I think this should be the reason why the led had died out ( supplying a voltage of 5V directly although there is a 2k ohm resistor present ). By the way, thank all of you for the replies!!!! ' v '

I want to use a good quality 9v battery

If you ever find one, be sure to let us know.

(if you have a specific question, it is best to start a new thread, rather than hijacking someone else's unrelated thread)

My error. Just finding my way around here.