Hi, all!
I have the top circuit, which is controlled by two manually operated switches. The circuit changes the resistance between points A and B depending on which switch is pressed. I want to replace the switches with a microcontroller, so I designed the bottom circuit. The outputs of the microcontroller are either a digital one, or a digital zero. The only voltage involved is 5 V.
Will this work? What value should I use for the base resistor?
This is just a DIY project — it’s not going to land a rocket on the moon — so I don’t need super precise values. Thanks a lot!

I have the top circuit, which is controlled by two manually operated switches. The circuit changes the resistance between points A and B depending on which switch is pressed. I want to replace the switches with a microcontroller, so I designed the bottom circuit. The outputs of the microcontroller are either a digital one, or a digital zero. The only voltage involved is 5 V.
Will this work? What value should I use for the base resistor?
This is just a DIY project — it’s not going to land a rocket on the moon — so I don’t need super precise values. Thanks a lot!

