Activating one piston while deactivating another at the same time?

I just wondered if it is possible to activate one piston while deactivating another (activated) piston with the same lever. The idea is to pull some blocks into the wall while other blocks are pushed up through the floor.


Solution 1:

You'll want to split the signal (just put branching redstone like a T shape) coming from the lever and reverse it for one of the pistons using a not gate. That will mean when one has power, the other doesn't. If the timing is off, you can also put repeaters after the split so one has a bit of a delay.