Friday, September 30, 2011

An Intro - Input/Output Gates, NOT Gates

I'm going to assume that since you're here, you've played Minecraft and you want an explanation of how to use Redstone. I know there are other tutorials for this, but to be honest, I'm confused by them at this point. My goal here is to write a guide simple enough that even I can understand it.

So what is redstone, exactly?

Well, it's an in-game material and a terrible lighting source, but what we'll be using it for is designing circuits. I'll get into that in a moment, but first, some technical info on redstone:
Redstone wire (or powder if you prefer) can carry power, for a distance of up to 15 blocks. Powered redstone wire lights up, and as it approaches the 15-block limit it will grow dimmer, but will still be powered.
Redstone wire can be powered by levers, buttons, pressure plates, detector rails, and redstone torches.

So, more on circuits! A circuit is just the path that a charge takes through our redstone. Here are two very simple circuits, to illustrate.

This is an Input/Output (or I/O) gate. This is the simplest you can get. In this case, the input is a lever, and the output is a piston. When the lever is in the off position, the piston is also in the off position...
... And when the lever is switched to the on position, the piston is also in the on position. There are no delays.

You could also easily reverse the on and off positions of the output. To do this, you make a NOT gate: that is, a gate where the input being in a given position means the output is not in that position. In other words, an on input has an off output, and an off input has an on output.

I've illustrated this with the same lever/piston setup as before.

The addition of a second power source - the redstone torch on the other side of the block that our lever is on - changes things so that the output is powered when the lever is off...
... And when the lever is on, the redstone torch switches off and removes power from the piston.

(Notice that the redstone torch is placed on a side of the block that the lever is on? I'm pretty sure that's not meant to be necessary, but it didn't work when I tried this set-up with the redstone torch on the ground of the block it's occupying. I'm chalking it up to a bug for now since it doesn't seem to be that way in every tutorial I've checked.)

I think that covers the basics. My next post will cover some more simple gates. Once I've worked through the basics of redstone circuits, I'll be covering some projects that you can make using them - my current goal is an automated sugar cane farm.

No comments:

Post a Comment