Talk:Lua Tutorials/@comment-72.12.202.194-20121205135421/@comment-74.74.171.191-20121212131228

You can use redstone.setOutput(string side, boolean on/off)

So redstone.setOutput("left", true) will turn the left side (when facing it) into a redstone output, so any wires connected to it will start working, just wire those up to your pistons.

When you want to close it call redstone.setOutput("left", false) and restone will stop transmitting from that side.

The best piston door code would be:

redstone.setOutput("left", true)

sleep(3)

redstone.setOutput("left", false)

This opens the door, waits 3 seconds and then closes it behind you. Hope this helped!