; Get state of button. If button is released, exit loop