Guide:Wiring

Wiring is a feature introduced to Terraria in the 1.1 update. Wires are not "on" or "off", rather, they follow toggle rules; hitting a switch will trigger every output connected to it by wire.

Basics
The basics of wiring are simple. The two main components of a circuit are inputs and outputs. An input is something that creates a current and an output is something that receives a current. The most important thing to remember is that nothing will generate a constant current. For most inputs, there is no such thing as on or off. They will activate every output wired to them one time when they are activated. This means that you can't wire a switch to a statue and make it constantly spawn things; You must either flip the switch repeatedly or add a timer.

In version 1.2, there are now three different colors of wire, placed using three different colored wrenches. The wire item is still the same for all wrenches; they are simply painted when placed. The three types are functionally identical, but red wire will not connect to blue or green wire, and likewise for blue and green; this allows more compact and complex circuitry to be designed.

Switches and Levers
Switches and levers are both inputs. They send a current once every time they are toggled. It doesn't matter which direction they are flipped. If you connect a torch to a switch, then it will turn off the first time you flip the switch and on the second time, even if the switch was in the off position when the torch was wired to it.

Pressure Plates
A pressure plate sends a current every time something walks over it. Stepping on the pressure plate activates it; Stepping off of it does nothing. The most effective use of pressure plates is enemy detection, be it for activating automated traps or just as an advanced warning so you can be ready to defend. (Note: Some pressure plates only detect players. See pressure plate.) Differently colored plates will trigger under different circumstances.

Torches and Other Lighting
Many light sources can be turned on and off if they are wired to an input. Their state will toggle upon receiving a current.

Doors
Doors will toggle their state upon receiving a current. Despite the fact that they only toggle, you can wire them to only close if you place the wire on a block that the door takes up when opened. If the door is closed, they will not receive the current and will not open. This is especialy useful for exits that need to be automatically closed for safety, without risking them opening accidentally. Entities standing in the door while it tries to close due to a current may sometimes cause the door to disappear, not even becoming a dropped item.

Statues
Statues that can be activated by wiring will activate one time whenever a current is received, providing that enough time has passed since the previous activation. Though not all statues provide actions. Statues are usually used for farms and require switches.

Actuators
Actuators will change the state of the block that they're placed on when a current is received. This allows you to create doors that are opened with a switch or lever instead of an actual door, which can be opened by enemies. Also, trap doors can be created so that lava pits and other traps can be covered when they aren't needed. This can also come in handy during Blood Moons when you can barricade the doors off using them.

Dart Trap
Dart traps will fire a dart whenever a current is received, provided that enough time has passed since the previous activation. The darts have a 100% chance of poisoning whatever they hit, as well as doing simple damage and clearing grass. Their range is quite high, going off-screen at 1600x800.

Other Traps
Traps will activate when a current is received, providing such action as dropping a spear from the ceiling or shooting out a jet of flame. Caution should be used when traps are suspected, as they can be extremely lethal to early-game players, dealing over 70 damage per hit with some armor(~20).

Explosives
Explosives detonate when a current is received. The explosion is slightly stronger than a Dynamite and is better because you can place it tactically and get to a safe distance. That is if you're willing to give up some wires and the detonator (if using a pressure plate for the trap).

Pumps
There are two kinds of pumpshit that can be crafted to move large quantities of lava or water. An input and output pump can be wired together with either a timer or a switch to move liquid from the input valve, to the location of the output valve via the wires connecting them. This method may also be used in a trap manner in defending your crafted home if used correctly.

Timer
There are three types of timer: one second, three second, and five second. Timers are both an input and an output, making them uniquely capable of sending close to a constant current. If a timer is active, it will send a current every n seconds where "n" is the amount of seconds between each activation . If a timer receives a current, it will change its state. Timers can be used with statues to activate them as often as possible. Unfortunately, timers can't be placed sequentially to create longer intervals between activations. Two one second timers will not add up to two seconds. A current will be sent at the interval of the shortest timer on the circuit. A simple use for timers would be making a disco room or mob area.

Engines
 Switches, levers and timers aren't the only way to keep a farm, light show, or series of traps running. Using Crab Statues or Bird Statues with pressure plates, you can create an engine that is simple to create, and is 2-8 times more efficient than a 1 second timer. By spawning crabs or birds, then trapping them so that they spam pressure plates, will allow a much more efficient and away from keyboard energy pulse. This makes it ideal for goldfish, hook, gel, and banner farms.

There are multiple guides on how to create them. The Bird Engine with multiple pressure plates is more efficient to use however and is much more compact compared to the Crab Engine, which requires a path for crabs to walk to the pressure plates.

In 1.2, with the addition of colored wires, it is now possible to connect six independent timers to a single statue. This will cause the statue to spawn six objects at once; this is faster than using a single bird or crab engine to power the statue, but of course using six engines instead will still be faster. The timers do have an advantage of simplicity, however, and also less noise from pressure plates.