Updated control_motion with the correct ir sensors' number.