Is there a more efficient way to wire a row of pistons?

I want to create two sets of two adjacent pistons with a two block gap between them for a melon farm. It seems as though I'm using a prodigious amount of redstone for each section. This is my first redstone circuit, but is there a better way?enter image description here


Yes, there a quite a few ways.

Come with me on an adventure in redstone optimization!

You can place Redstone Repeaters behind each of the pistons as shown below. This will direct the input into the piston and prevent those annoying loops that usually don't accomplish anything. This will take up much less space, but uses a total of 18 redstone dust.

enter image description here


A more redstone efficient design would be this. It uses only 11 redstone dust. Other players not required. This method works because a piston can be powered by an adjacent powered block.

enter image description here


This design (courtesy of Tristan) uses a minimalistic 7 redstone. The lever powers both the block that it occupies and the block it attaches to. The hole on the right is required to keep the signals going to the two pistons separate.

enter image description here


Finally, this uses a measly 4 redstone. Since you're powering 4 pistons, I think 4 redstone is likely as low as you're going to get.

enter image description here

Science!


The easiest way I've found to power pistons is to place a block behind it on the same level and lay redstone on top of that block.

This way you can do it with 5 redstone: 1

Which can be easily extended to include more pistons. Which seems relevant as you're talking about sets and sections. Though the lever in the middle is probably not the most convenient place to put it, but it is most efficient in redstone usage.

If you have the lever on the beginning you can put 4x2 pistons with 14 redstone, adding another 4x2 to this costs another 14 redstone + 1 redstone and repeater to connect them. Which you can theoretically extended infinitely: 2


You can use repeaters to power multiple aligned pistons quickly and easily, like so:

You can craft repeaters like so:

---------
  |   |  
t | r | t  t = redstone torch
s | s | s  r = redstone dust
---------  s = stone block

Note that repeaters introduce a tiny delay to your circuit, but unless you need absolute speed, this system works fine.