What are transistors.

nothing is working

Muneeb:
nothing is working

Then your doing it wrong. Post a drawing of what you are trying to wire up.

Lefty

Then you have either wired it up wrong, got the LED round the wrong way or you have a faulty transistor. Did you replace it because your previous circuit would have distroyed your previous one.

Have you set the arduino pin to the output mode in the setup() function?

should it fade like a resistor

well, the code is the BLINK
i just changed the delay function to 1

That will blink faster than you can see and so should look half on. When you say nothing works exactly what to you see?
You should have a delay of something like at least 500 to give half a seconds delay.

wait,
i'm gonna come back in 20 minuts.

I only see two wires connecting your circuit to the arduino, there should be three. A 5v, a ground and a signal from pin 13.

guesse what, my red led is dead.
and i felt really the transistor really hot after touching it

The transistor should not be hot check you have identified the leads correctly. Also have you sorted out the missing wire from those photos?

can you put photo of it, its gonna be easy for me to plug the wires

@Muneed

I look at your picture, and I want to know what type of transistor you are using - NPN ? PNP ? MOSFET ? What ? Well you can tell by the number/letter in front of the transistor. The one you are using is a TO-220 <-- Package type. That tell me it is a "power type" I can handle a few amps.. And yes IT WILL get HOT !! if a lot of currents go through it. ( need a heatsink ) Here the site I use when I have a number/letter of a unknow transistor. http://www.datasheetcatalog.com/

Ok for exammple, the number 2N3904 is a NPN small signal general purpose - TO-92 package can only handle small current.

Small current ===> a street ( low traffic ) A high current ====> a 6 lane highway ( high traffic ).

And please tell us the number of that transistor you are using.

IRF520 Mosfet Transistor

Now you tell me!!!!!
That is a FET it is not a transistor. All that stuff about how a transistor works is not relevant to your device. What is more your device requires 10V to turn it on. This is more than the arduino can supply so in general you can't use this device with the arrangement you have been looking for.
So how did you identify the emitter base and collector on you device because it doesn't have them. It has a gate drain and source. So basically you have been lying when you say you have.

I was having a feeling that was a MOSFET. That will explain the transistor got hot. Kiss goodbye the LED. I hope the Arduino is still working. Why you simply use a 2N3904 or something like that ? No parts, right ?

That is a FET it is not a transistor.

So what does the T in FET stand for? :smiley:

About the poll. The answer is None of the above. They are silicon type - 2N3904 and also germanium type - 2SB56. <-- That one is a oldie

About the poll....I made it up ]:smiley: (because I couldn't remove it)

(I have an OC71 in my spares drawer, and an OCP71 I made by scraping the paint off an OC71)

So what does the T in FET stand for?

Don't know?

However he did talk about E B and C so it was a fair guess it was a bipolar.
How can you hope to identify the leads as EBC when you have a FET?

I have an OC71 in my spares drawer,

I have quite a few OC28 these are power transistors.

what does MOSFET Transistors do?

connect the ground to the left pin
connect the 5 v to the center pin
connect the right pin to a motor
and connect the motor pin 13

it still does nothing

and this thransistor was in arduino uno kit