Created PIMain and ControllerMain for running on pis and controller
computer respectively.