Symptom: The heads swap back and forth rapidly. Fix (Minecraft): Replace redstone dust with rails and a redstone block. Remove quasi-connectivity by separating circuits with a non-conductive block like a slab. Fix (IRL): Your Arduino code needs a debounce delay. Add delay(500); after the trigger reads.
Symptom: The piston extends but the head gets stuck on the decorative archway. Fix: Reduce the hitbox. In Minecraft, use a barrier block as the mount. In real life, sand down the back of the polymer clay head to a depth of 5mm. lovely craft piston trap head swap
The key to a "lovely" swap is speed. If the pistons move slowly, the victim sees the switch. Use a comparator clock to make the pistons extend, swap positions, and retract within 2 game ticks. Symptom: The heads swap back and forth rapidly
Place an observer block facing the pressure plate. Run redstone dust from the observer into a repeater (4 ticks). Split the line to activate both sticky pistons simultaneously . Fix (IRL): Your Arduino code needs a debounce delay