Yes, mechanical engineering is somehow related to hardware development. After graduation you can opt for a short term certificate course in PC hardware and networking. It will build strong grounds for the hardware developer career with respect to knowledge of information technology and skills. After that you can opt for internships in high-tech manufacturing firms.