I have a small LED of 5mm and an arduino powered by 9V. When I connect the LED to Vin (9V) using a 330 ohm resistor the LED brights very high. When I connect the LED to 5V (from arduino) using a 330 ohm resistor the LED brights very low.
Ok, that's supposed to happen.
Now I use a transistor 2n222 to power the LED. The problem is that if I use 5V or 9V (Vin) to power the LED it gets the same brightness. In the base I am using a digital pin sending HIGH.
Why does the transistor does not allow my LED to get brighter when the collector is connected to 9V source power?