I’m playing around with transistors lately and something doesn’t work right.
The setup is as follows:
One PNP transistor,
Base goes to pin 2, Collecter is +5V, Emitter is LED and then to ground.
So far everything works fine, pinmode is set to output and I can switch to HIGH, LED goes on, LOW, off.
But if I attach an extrenal circuit:
9V Battery, Base still goes to pin 2, Collector is +9V, Emitter is LED and then arduino Ground, and 9V Block ground goes to arduino ground.
But if I change from HIGH to LOW now all that happens is, the LED gets dimmer but its not turning off anymore… what am I doing wrong?