Position a piston behind a decorative wall block (like a stone brick pillar or a hollowed-out tree trunk) facing the pumpkin growth spot.
Check your NOT gate. Ensure the redstone torch is placed against the side of a block, properly powering the line leading to the pistons. lovely craft piston trap pumpkin patched