Mr Guthrie's Computing website
Setting up your world
For this, you will need to get some items from your inventory. You'll need a block of some sort (wood is fine), some redstone dust, a lever and a redstone torch.
Later on you'll also need sticky pistons, a redstone repeater, some string and tripwire hooks
Place the blocks
Place two blocks with 2 spaces in between (the circuit will just activate automatically without at least this space)
Then place a lever on the outside of one of the blocks (opposite to the other block)
On the other block, add a redstone torch - this will come on when the lever is off and go off when the lever is on
Lastly add redstone dust between the two blocks and play with the lever to see if it works
Making a more complex circuit
This part of the tutorial will take you through how to make a pit trap.
It uses a NOT gate to hold open sticky pistons when someone hasn't tripped the trip wire and close them when someone does trip the wire. This means that the eart will disappear beneath them and they'll fall into a pit of despair (hopefully zombies)
First dig a pit. It needs to be quite deep to hold a zombie in.
next to the pit, you need an empty row 1 deep and then sticky pistons facing in towards the pit.
Now put in a row of blocks attached to the inside of the pistons (these will be pushed in to the middle when the trap has not been set off
Now you need two blocks
A NOT gate is an inverter that converts a 1 (or ON) signal into a 0 (or OFF)
This guide will help you to build a simple NOT gate using redstone in Minecraft and then go through how to make a more complex NOT circuit to create a zombie pit trap