MEMS mechanisms for assembling automatically hinged components, self-assembly devices