Self-folding miniature elastic electric devices