added openCV, shifted control logic to PC side