Is there a three way switch?


#1

Im trying to use bi-colored leds like this:

State one = no light
State two = green
State three = red

And I'd like to cycle across those states.

I got led connected to two PA's. I can swap the color but getting it turn off on the third state I don't know how to achieve. I can swap the color or just swap one color on and off. I've tried to work it with toggle flipflops and switches.

Any ideas?


#2

Like this maybe?


#3

Nice, that does it!
Can I connect a hardware button to make the switch? Can I disable the fourth state somehow?

EDIT:
I managet to get third color which is orange, so both colors same time. So now Im trying to get the fourth state to be "no light".


#4

I think you cant disable the forth state.

In the hardware world it work slightly different I think. You would connect a 3 way toggle. From guitar pickup select switches I know these work like:
0 = Signal 1 On
1 = Signal 1+2 On
2 = Signal 2 On

To make this work with axoloti you would I think reverse it and feed the toggle the VDD and than make signal 1 2 two pins.

You would then use some logic to turn into something useful: