I need to make circuit in which orange LED will light only when yellow and red are disconnected. When one of buttons is pushed orange LED should turn off.
See my attempt at it below.
I am new to electronics so your help is very appreciated.
EDIT:
After many atemps I managed to build this circuit as on left side of schematic (tested on live breadboard)
but my primary goal is to make this work with RGB LED. I took Common Anode RGB LED for this and build circuit on right side of schematic. I do not have such RGB LED to test it live so I ask you to review if that schematic will work as it has few changes to one with 3 LED's. Thank you
SOLUTION:
Thanks to Bruce's help my circuit now works.
3 separate LEDs emulate common anode RGB LED (as I do not have one to test circuit)
Q2 is BC 560B transistor with CBE type pinout
CODE:
void setup() {
pinMode(2,INPUT);
pinMode(4,INPUT);
Serial.begin(9600);
digitalWrite(2,HIGH);
digitalWrite(4,HIGH);
}
void loop() {
Serial.println(digitalRead(2));
Serial.println(digitalRead(4));
}