# How to enable redstone wiring with a flick of a lever?

I'm looking for a solution to enable redstone wiring (completing a circuit) by flicking a lever. If you don't know what I'm asking for, imagine that sticky pistons could push redstone dust, and flicking the piston on and off would push that redstone dust in the middle of two redstone wirings to connect a circuit together. (That example is just to explain the problem, I know that redstone wire can't be pushed)

One solution I thought of was to use a block in place of redstone dust to complete a circuit, but it seems to not work (the piston does not extend when powered).

https://prnt.sc/ssq5io

I can see in your linked screenshot that you're using a slime block for some reason. Just a sticky piston on its own work work as well. And the slime block also tries to push the block below, which would push the block in front of that and in front of that and… It's basically trying to push an entire row of the world, which is much more than the limit of 12 blocks that pistons can push.

Just moving the piston forwards, replacing the slime block, would solve your problem.

When the lever is turned on, the piston pushes the block out of the way of the wire, letting it sneak under the piston arm.
When the lever is turned off, the piston pulls the block back in the way of the redstone wire, and it stops working.

The concept is based on a simple AND gate, where the output is only on if both inputs are on. Like this:

For the redstone lamp to be on, the redstone trail must be on AND the piston must be extended. That's the whole point of an AND gate!

This doesn't have an accepted answer, so I thought I would give it a whirl...

Why not use a redstone repeater, then have the lever send a signal to the side of the repeater. Use a redstone torch in front of the lever, to reverse this logic, i.e. the lever turns the torch off, and the signal locking the side of the repeater, will turn off, thus allowing the repeater to take a signal.

When a signal is sent to the side of a repeater, it locks the output state of the repeater.

References:

The only downside to this, is if you are dependent on specific signal strengths in your main circuit. A repeater will always boost your signal back to 15.

From how I understand the problem, you want to control the output piston with 2 inputs, using a piston to make or break the line, but, there is one component that no one has mentioned yet. A comparator in subtract mode, it has its advantages to the piston method, it doesn't require any moving parts, and it is completely silent.

What you do is you have the main wiring pass through the comparator(don't forget the subtract mode by right clicking it), and the secondary circuitry should pass through a repeater powering either of the sides of the comparator, and you can invert it however you desire.