moved rpi hw interaction to its own file