Patent ID: 11755075

Abstract:
An electronic device according to embodiments of the present disclosure may include: a first housing, a second housing coupled to the first housing, and configured to move in a first direction from a first position to a second position or in a second direction opposite the first direction between the first position at least in part accommodated in the first housing and the second position protruding from the first housing, a driving unit comprising a driving motor configured to move the second housing in the first direction or the second direction, a first sensor configured to detect a position of the second housing, at least one processor operably coupled with the driving unit and the first sensor, and a memory operably coupled with the at least one processor, wherein the memory may store instructions which, when executed, cause the at least one processor to: detect an input for moving the second housing in the first direction, control the driving unit to drive the driving unit for a first time to move the second housing in the first direction, identify whether the second housing is positioned at the second position through the first sensor, in response to identifying that the second housing is not positioned at the second position, control the driving unit to drive the driving unit for a second time to move the second housing in the second direction, and control the driving unit to drive the driving unit for the second time, and control the driving unit to drive the driving unit for a third time to move the second housing in the first direction.