With the new program I had the problem that there always was the problem "out of resources" when it tried to start the camera, since it also was sending all movements at the same time. After removing all movements to send, it worked properly again. So my solution would be not start the camera and send the data at the same time