1. If you're looking for help-related things (for example, the key rebinding tutorial), please check the FAQ and Q&A forum! A lot of the stickies from this forum have been moved there to clean up space.
    Dismiss Notice

Button Toggle Switch

Discussion in 'Starbound Discussion' started by Exokem, Sep 7, 2016.

  1. Exokem

    Exokem Big Damn Hero

    Is there a way to make a toggle switch using a button or rail sensor instead of a lever? I was looking for a way to make this possible but couldn't really figure out a way.
     
  2. Proydoha

    Proydoha Phantasmal Quasar

    I'm away from my pc and can't make facny gif but here's how you should wire it.

    You'll need
    [BUTTON]
    [AND 1]
    [AND 2]
    [NOT]
    [PERSISTENT SWITCH]

    Then you connect:
    [BUTTON] output to first input of [AND 1]
    [BUTTON] output to first input of [AND 2]
    [AND 1] output to first (set) input of [PERSISTENT SWITCH]
    [AND 2] output to second (reset) input of [PERSISTENT SWITCH]
    [PERSISTENT SWITCH] output to second input of [AND 2]
    [PERSISTENT SWITCH] output to input of [NOT]
    [NOT] output to second input of [AND 1]

    Now every time you press your button persistent switch should toggle between on and off.

    Unless it won't work because buttons by default are turned on for too long. If this happens then you'll need extra AND and extra NOT gate. Wire your button to AND gate and to NOT gate, then connect NOT with AND. This should give you super short output from your button.

    I'll post gif when I'll get to my computer.
     
    Last edited: Sep 7, 2016
  3. Proydoha

    Proydoha Phantasmal Quasar

    Alright. I'm at home. Here's images:

    [​IMG]

    And wire view:

    [​IMG]
     
  4. ItsTheKais

    ItsTheKais Phantasmal Quasar

    The Small Wall Switch does that all by itself if you connect its wire input. It does make a little noise, though.
     
  5. Proydoha

    Proydoha Phantasmal Quasar

    Seems like he wants to use rail sensor and it acts like a button.
     
  6. SephMoon

    SephMoon Phantasmal Quasar

    I think ItsTheKais means to use the small wall switch in place of your logic gate setup. The small wall switch has an input connector on it, allowing it to function like a T flip flop. Connecting a button to the small wall switch will turn that button into a toggle button. The only downside of this is the sound you can hear of the switch flipping between states.
     
  7. Proydoha

    Proydoha Phantasmal Quasar

    Oh! That should work too. I keep forgetting that small wall switch has input.
     
  8. MillPalerm

    MillPalerm Space Hobo

    Hi everyone..i am a new user here. As per my knowledge you should use small wall switch in place of your logic gate setup. The small wall switch has an input connector on it, allowing it to function like a T flip flop. Connecting a button to the small wall switch will turn that button into a toggle button.
     
  9. SephMoon

    SephMoon Phantasmal Quasar

    Welcome to the forums!

    That said, I find it kind of strange that for your first post you decided to copy and paste what I said a couple of posts earlier in the same thread...

    Also, I wonder if Exokem ever got his toggle button working...
     
    Thorin and lazarus78 like this.

Share This Page