An electronic device comprising: a transmitter configured to emit light beams; a reflector configured to reflect the light beams; an actuator configured to steer the light beams towards an external object by controlling a direction and angle of an inclination of the reflector; a receiver configured to receive the light beams reflected from the external object; and at least one processor configured to detect the external object by using the received reflected light beams; wherein the reflector is levitated from the actuator by an electromagnetic interaction of permanent magnets attached to the reflector and control coils included in the actuator; wherein the actuator comprises: a base, and the control coils (546, 548) disposed on the base, wherein the control coils comprise: horizontal-control coils configured to control a position of the reflector in a horizontal direction, and vertical-control coils, different from the horizontal-control coils, configured to control a position of the reflector in a vertical direction, wherein when each of the vertical-control coils is supplied with a respective first direct current, a vertical force proportional to the respective first direct current is applied to the permanent magnets in a vertical direction, and when each of the horizontal-control coils is supplied by a respective second direct current, a horizontal force proportional to the respective second direct current is applied to the permanent magnets in a horizontal direction, wherein the at least one processor is configured to control the direction and angle of the inclination of the reflector by controlling the direct currents supplied to the control coils (546, 548). a transmitter configured to emit light beams; a reflector configured to reflect the light beams; an actuator configured to steer the light beams towards an external object by controlling a direction and angle of an inclination of the reflector; a receiver configured to receive the light beams reflected from the external object; and at least one processor configured to detect the external object by using the received reflected light beams; wherein the reflector is levitated from the actuator by an electromagnetic interaction of permanent magnets attached to the reflector and control coils included in the actuator; wherein the actuator comprises: a base, and the control coils (546, 548) disposed on the base, a base, and the control coils (546, 548) disposed on the base, wherein the control coils comprise: horizontal-control coils configured to control a position of the reflector in a horizontal direction, and vertical-control coils, different from the horizontal-control coils, configured to control a position of the reflector in a vertical direction, wherein when each of the vertical-control coils is supplied with a respective first direct current, a vertical force proportional to the respective first direct current is applied to the permanent magnets in a vertical direction, and when horizontal-control coils configured to control a position of the reflector in a horizontal direction, and vertical-control coils, different from the horizontal-control coils, configured to control a position of the reflector in a vertical direction, wherein when each of the vertical-control coils is supplied with a respective first direct current, a vertical force proportional to the respective first direct current is applied to the permanent magnets in a vertical direction, and when each of the horizontal-control coils is supplied by a respective second direct current, a horizontal force proportional to the respective second direct current is applied to the permanent magnets in a horizontal direction, wherein the at least one processor is configured to control the direction and angle of the inclination of the reflector by controlling the direct currents supplied to the control coils (546, 548).