Cost-effective, bio-compatible nanogenerators can harvest electricity from vibrations for optoelectronics, self-powered devices