Minecraft – Getting a row of pistons to trigger

minecraft-java-editionminecraft-redstone

I have been trying to get an row of 7 pistons to fire when a block has been pushed in front of the middle one. Every technique I try is not firing them. This is a Cobblestone floor maker. Here is an above view of the layout:

P = Piston
B = Block (I am using stone)
A = AIR SPACE
W = Water
L = Lava
X = Trigger Space

BBBBBBBBBBBBB

BLBPPPPPPPBLB

PAAAAAXAAAAAP

BwBAAAAAAABwB

BBBAAAAAAABBB

Best Answer

If I am correct that this is your layout:

enter image description here

Then this solution should work:

enter image description here

Note that this is a sticky piston.