Integrated motion detection