Guide talk:Wiring

Timers CAN be placed sequentially to create longer intervals between activations (Sort of)
I've actually been able to do this with a huge mushroom farm (unfortunately I lost the world file to "data corruption/crimson", all I have left is a screenshot before the timer set up). The idea was to load up all the mud blocks with actuators and set them on a timer to disappear and "auto harvest" the mushrooms. However, I thought that a 5 second interval would be too slow to allow the mushrooms to grow (haven't completely tested this theory) so I hooked up multiple timers as follows:

A---B+++C---D+++Mushroom

Where A/B/C/D are 5 second timers and Mushroom is the entire wiring of the mushroom farm. The --- and +++ indicate different colored wires. The sequence of events was thus:

1. I turn on A. After 5 seconds, A turns on B. Now A and B are both on.

2. 5 seconds later, B fires a microsecond before A and turns it off. It also turns on C. Now only B and C are on.

3. 5 seconds later, C fires a microsecond before B and turns it off. It also turns on D. Now only C and D are on.

4. 5 seconds later, D fires a microsecond before C and turns it off. It also turns on the mushroom farm and makes all the blocks disappear, harvesting the mushrooms (which had about 20 seconds to grow). Now D is on and the mushroom farm is phased out.

5. 5 seconds later, D fires and makes the mushroom farm visible again. It also turns on C. Now C and D are both on.

6. 5 seconds later, C fires a microsecond before D and turns it off. It also turns on B. Now only B and C are on.

7. 5 seconds later, B fires a microsecond before C and turns it off. It also turns on A. Now only A and B are on.

8. 5 seconds later, A fires a microsecond before B and turns it off. Now only A is on.

The sequence repeats from step 1 onwards. The next time the mushrooms would be harvested, about 40 seconds of visible time would have elapsed, allowing a healthy crop to be harvested.

Agent 00 BLeRD 180.178.147.173 06:38, 20 October 2014 (UTC)

One Shot switch
User created switch types.
 * To create a switch that can only be pressed by monsters one time make a 5 block wide base. Put a pressure plate that works with monsters in the middle.  Two empty spaces should be on each side.Place blocks into the empty spaces, and place actuators on each block.  There should be two on each side.  Wire the whole row together.  Connect a lever or a switch via a wire.  This is a reset switch.  If you press the reset switch, the four blocks on each side of the pressure plate will be actuated and disappear.  Now a monster can step on the switch.When the monster steps on the switch, the blocks will appear, and force the monster upwards.  This type of one shot switch can still be pressed in its on state by a worm.  You can make the lower pad out of stone, and have cavities on either side to capture worms that move towardsthe one shot switch arrangement. A one shot switch can be wired to door shields made of active blocks or actuated blocks on a house to make house defense walls go up.

I've created the above description for a useful user build switch type. Since this isn't my guide, I will leave this here pending approval. --Zoeymithra (talk) 00:47, 3 August 2014 (UTC)

Logic Gate?
With a great deal of inventiveness, it may be possible to build logic gates, after a fashion. There are a couple of things that I can see having a sort of on/off state: lighting, doors, and timers. I see no way to test lighting and get an output signal.

Doors seem easiest to manipulate. You can wire one switch to open it and a separate one to close it. This way, you know which state it will be in. That way if another mechanism sends multiple "open" signals, it will simply be open, rather than opening and closing several times to some random end state.

I'm more fuzzy on how to actually use its state for any purpose. It would be possible to use mobs hopping or walking through open doors to activate a pressure plate. It feels more elegant to have opened doors release a liquid... although I don't know how this "output" would be converted into a signal. Perhaps by bouying slime and lifting them off a pressure plate? I'm also not sure how either of these interacts with despawn/rendering range.

Timers have a definite on and off state. The downside is that players would toggle this blindly. (When toggling it, there isn't an "on" switch and an "off" switch. This may be a minor detail though.) It can be attached to pumps to bouy a slime as before or drain a chamber, allowing them to activate a plate (repeatedly, of course).

Perhaps this is an exercise in futility. Does anyone else have thoughts to share? -- TechpriestMagos 23:48, 6 January 2012 (UTC)
 * the issue with making (static, non-clocked) logic gates, is that terraria's wiring system is purely a toggle and no "signal". a person on the forums made some ok models for (clocked) logic gates by using bunny statues and active/inactive stones to redirect the bunnys' path to different buttons.  in preference, that was only nice design out of the few he posted. 98.132.163.231 11:44, 7 January 2012 (UTC)
 * I've done some thinking about this stuff. Because the wiring systems are toggle based, it is difficult to make gates.   Also because you can't query the state of a network or say a torch, you can't make a decision gate of any kind.   It is possible to make a flip flop using mine carts, and it is possible to make one shot switches using actuators.   The game would have to be extended to include simple logic gates to improve the functionality.   The only gate required would be a NOR gate or a NAND since all the other gates can be made from those two functionally complete gates.   I have some videos on youtube on Gamer channel Channel by my character Poozly that show how to make various switches and a flip flop.  Because you can make a one shot, you can also make a non mine cart flip flop, but I've not actually implemented it at this time.   Electronically a flip flop is a divider of a signal, but it doesn't constitute a functionally complete gate so we can't make other gates out of it.

Functional Statues link
Can someone please add this link somewhere in the 'Statues' section: terraria.gamepedia.com/Statues#Functional_statues