I am looking to push a button and one led comes on when i push the same button again the first led goes off and the second light comes on. alternating lights each time the button is pressed. one light should always be on.
I was hoping to use a microswitch as the button i want to use has a microswitch that i was going to switch. Would this be a dpdt? Does that exist in a latching pushbutton. Any other circuit ideas that would work?
I appreciate the input
Best Answer
An alternating (push-on, push-off) pushbutton switch would be the easiest. It needs to be SPDT (or better). There are plenty available.
simulate this circuit – Schematic created using CircuitLab
If you want to connect it to an MCU or other logic, then R2 can be used to assure a valid '0' logic level, otherwise you don't need R2.