Trailmakers
3-state toggles?
Has anyone figured out a way to build a three-state toggle? (One button that, when pressed, cycles between activating three different things)

I managed to create positive-edged D flip-flop using 13 logic gates, but I'd have to copy that pattern twice to build a 3-state toggle that way and that seems pretty complicated. Any simpler ways?
< >
Showing 1-2 of 2 comments
alvaroping1 Sep 11, 2020 @ 1:46am 
Or gates+toggle act as a pretty good flip flop using a single gate, using them you can make a 3 state toggle with just 7 logic gates (+2 extra ones for setup, but those can be used for all circuits that you have that require a setup, so each additional 3 state toggle only requires 7 gates).

Simply take 3 OR logic gates with toggle and put them on a row, then take 3 AND gates and put them on a row below the OR gates, then connect each OR gate to the AND gate below it and to the next AND gate on the row (the last OR gate is connected to the first AND gate) and each AND gate to the OR gate above it, then take another OR gate, set 0.001 as delay and 0.02 as active time and connect it to all AND gates, that OR gate is the input of the system, the toggled OR gates are the outputs. Finally take an always on sensor (distance sensor with 0 range and invert trigger) and connect it to a new OR gate, on that OR gate set 0.001 as delay and 0.02 as active time and connect it to the first toggled OR gate.

As an additional note this can be expanded infinitely to an n-state toggle, however for bigger values of n (depends on for what you are using it, but it's usually between 7 and 20) there are other circuits which use less gates, here is an example blueprint for n=10: https://steamcommunity.com/sharedfiles/filedetails/?id=2134487841
Last edited by alvaroping1; Sep 11, 2020 @ 1:51am
My Little Pwny Sep 11, 2020 @ 5:46am 
Wow, thank you so much! Your 1-gate flip flop is much better than my 12-gate one.
< >
Showing 1-2 of 2 comments
Per page: 1530 50

Date Posted: Sep 10, 2020 @ 8:28pm
Posts: 2