You can power a block adjacent to the piston with a repeater. Since you are having the pistons go upward, it's easiest to power the block below them. The repeater is necessary to direct the power into the blocks when you have more than one piston side-by-side – otherwise, simple redstone wires will just form a line and direct the power past, not into, the block.
This video demonstrates the construction of an automatic-harvesting wheat farm, part of which is a piston design that does exactly what you're trying to do (the embed is set to skip to 7m25s where the piston wiring begins):