Powering a Redstone Lamp on top of a Piston
I am trying to design a street lighting system which is controlled by a light sensor.
What I would like to have is for the redstone lamps to be lowered, flush with the ground, during the day but at night a piston below raises them up from the ground and they switch on.
At first (having had no experience with pistons) I thought this would be easy. I figured if the piston is powered on, then it will transer power to the lamp. Apparently this is not the case. The lamp raises from the ground but it is not switched on.
I can get the lamp to switch on by putting a power source next to it, above ground, of course, but I'd rather this was totally clean, with just the lamp visible.
Is there a way of neatly powering this lamp when it is raised?
I have tried googling, but nobody else seems to have tried this before (or at least not documented it).
77 Answers
In the latest snapshot of 1.8, this has become really easy. Here's a view of the redstone (the piston is sticky):
Those furnaces have to be something that can not be pushed by a piston, a furnace is the cheapest, but you can also use obsidian.
Top view:
Everything covered up:
EDIT: nightcracker has provided a much simpler answer, so this answer is only valid if you don't use Slime blocks for religious reasons :-)
EDIT 2: even if so, go use Bergi's design, it is still superior :-)
This is possible, albeit complex.
My prototype has 1 regular and 6 sticky pistons, and 6 redstone inputs that need to be cycled in a correct order for it to work. I'm afraid to think of control circuits it will require (either under each lamp, or 6 wires from the center to each lamp).
I am not very experienced in optimizing redstone signals, so I have limited myself to the mechanical part. If you finish this, please share!
1Here's the simplest way, although it does have a single piece of redstone + a couple half slabs:
Day
Night
Covered up
The concept behind it is hooking the sticky piston and the anticipated position of the raised lamp up to a NOT gate, so when the sun goes down, the lack of power triggers both the piston and subsequently powers the lamp.
I liked the challenge so I went on improving and simplifying @OrcJMR's design. The idea to push/retract the lamp with a sticky piston and power it then enabling it by exchanging the piston with a side-powered block is the same (and probably the only way without slime blocks), yet everying else has changed.
It takes only two regular pistons (horizontal), two sticky pistons (vertical), four repeaters and two redstone torches:
All the repeates are set to a 2-tick delay (1 click), except for the locked one in the FED, whose pulse will push in the piston for retracting the lamp and then (delayed by the torches) also flickers that piston, which is set to a 4-tick delay (3 clicks). The lever is located on the input, a daylight sensor or so will work as well.
5Are you using any mods? Inverted lamps (FTB) just might do the trick for you... Just cover them when you move them back to ground.
1I tried to come up with a way to make that work with the new slime block mechanics, but the problem is when you use a slime block to push the redstone block in from the side, and then push it up from the bottom with another slime block, the slime blocks then connect, and pulling the redstone back down pulls the side slime block down as well, so you can't pull the redstone to the side afterwards. Perhaps someone else may figure out a way to do it, but I'm not sure it's possible.
I'm sure you've seen something like this already, but here's an option that you could use if you like it:
one thing many of you are forgetting, is that he wants the light hidden during the day, I've come up with a solution to that problem, but it would need to be hidden in a hill and modified to fit, this includes hollowing out some of the hill in order to make the piston work Extended Theoretical View
Lowered Theoretical View
Lowered Practical View
Extended Practical View.
please note that the hill I've used was a combination of naturally spawned land and constructed hills, also, I've just noticed that I've forgotten to get a better view of the redstone lamp in the extended practical view, it's barely visible as the side of one of the blocks on an edge piece.
aside from the hill and daylight detector, the light and redstone would be completely hidden,
1