added a way to know when to stop moveing with the angle sensor