I want to toggle between 2 devices using one GPIO 3.3v pin and powering them with 5v.
I thought about using an NPN and PNP transistor, tying up the base and collector/emitter to 5v power supply. If the GPIO pin goes HIGH or LOW, switch trough either transistor.
So far, I have tried a lot to get it work somehow. But i do not seem to be able to have either the NPN or PNP transistor not be triggered to a degree somehow.
I am too embarrassed to show any of these noob tries, and just want to ask you guys for Ideas how to approach that problem. Am I going a completely wrong way with this?
Is thinking of it like a
Y switch wrong?
Thanks für input on this very confusing matter.
EDIT: Some basic Idea, without any resistors (since they are part of my problem: I con't find out, where to place them and how strong.) Placed on my breadboard to get started with LEDs ...
One LED should be ON while the switch is pressed, then should switch to the other if pressed.
Edit 2: Thank you for all your amazing additions to the post. It will probably take me some time to look up all terms and try to understand the explanations :) So please bear with me.