Folding a cube (animation)
one possible way is to use :


use the Transformation constraint to convert translation to rotation from control bone to lower bones
use the copy rotation constraint to make the upper bone rotate in reverse to the lower bone 


 


The Transformation constraint to the lower bone with this settings :





the Copy rotation constraint on the upper bone :





there's only one plane ( with middle edge) and have an array modifier controlled by an empty ( see the .blend file )