Minecraft – How to put sticky pistons on a delay

minecraft-java-editionminecraft-redstone

I'm pretty new to messing around with redstone and I have concocted a pretty simple hidden door with sticky pistons, as shown here:
enter image description here

It works fine, pull the lever and the pistons pull the blocks back. Moving forward, however, I would like to somehow implement a way for me to close the hidden door behind me, ideally working so that I could also open them from the inside for maximum stealth. Here is a shot of the (simple) circuitry:

enter image description here

Best Answer

You can use a button or pressure plate to send a pulse of power, rather than a lever that will stay on once flipped.

Walk in when the door is open and it will close behind you. You can use repeaters to adjust pulse length and delay. Put a similar button on the inside for exiting. A bonus of this is that a stone button placed on a stone block blends in well.

For a more advanced solution, you can make a flat wall on the front and use two sets of pistons instead of one. The first set will pull the blocks into your base, and the second set will pull them to the side. This requires more careful timing and more room for repeaters and pistons on the inside. If you use an RS-NOR latch, you can make the door stay open until you enter and step on a pressure plate.