Patent Description:
Electronic devices are being developed to be able to receive various inputs from the user through a specified input device (e.g., a stylus pen) connected with the electronic device via wireless communication. An electronic device may identify a designated position on an electronic device with a pen input device (which may be referred to herein as a stylus pen for ease of description) and perform its corresponding function.

The electronic device may detect magnetic fields produced from the stylus pen using electro magnetic resonance (EMR). An electronic device may identify the position of a stylus pen based on an electromotive force generated by a magnetic field per channel.

The stylus pen may be connected with the electronic device via short-range communication (e.g., Bluetooth low energy (BLE)). The stylus pen may transmit information about a pressing state of a button on the housing of the stylus pen to the electronic device via short-range communication, and the electronic device may perform a designated operation based on the received information.

The electronic device may perform the designated operation depending on whether the stylus pen button is pressed. However, only a few electronic device operations may be matched to the on/off of the stylus pen button. An application supporting various operations based on a stylus pen may be difficult to effectively control. For repeating a certain operation, the user may be required to repeat manipulation of the stylus pen.

<CIT> discusses an apparatus for operation of a pen function in an electronic device. <CIT> discusses a stylus compute for data entry and manipulation.

Embodiments of the disclosure provide an electronic device and method for operating the same that identify a gesture with a stylus pen based on information included in a communication signal received from the stylus pen and repeat an operation corresponding to the identified gesture.

Other aspects, advantages, and salient features of the disclosure will become apparent to those skilled in the art from the following detailed description, which, taken in conjunction with the annexed drawings, discloses various example embodiments of the disclosure.

<FIG> is a block diagram illustrating an example electronic device <NUM> in a network environment <NUM> according to various embodiments.

According to an embodiment, the sensor module <NUM> may include, for example, a gesture sensor, a gyro sensor, an atmospheric pressure sensor, a magnetic sensor, an accelerometer, a grip sensor, a proximity sensor, a color sensor, an infrared (IR) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.

The antenna module <NUM> may transmit or receive a signal or power to or from the outside (e.g., the external electronic device). According to an embodiment, the antenna module may include one antenna including a radiator formed of a conductor or conductive pattern formed on a substrate (e.g., a printed circuit board (PCB)). In this case, at least one antenna appropriate for a communication scheme used in a communication network, such as the first network <NUM> or the second network <NUM>, may be selected from the plurality of antennas by, e.g., the communication module <NUM>. According to an embodiment, other parts (e.g., radio frequency integrated circuit (RFIC)) than the radiator may be further formed as part of the antenna module <NUM>.

According to an embodiment, instructions or data may be transmitted or received between the electronic device <NUM> and the external electronic device <NUM> via the server <NUM> coupled with the second network <NUM>.

<FIG> is a front perspective view illustrating an example electronic device <NUM> including a stylus pen <NUM> (e.g., the electronic device <NUM> of <FIG>) according to an embodiment. According to an embodiment, the stylus pen <NUM> may correspond to the input device <NUM> of <FIG> or the electronic device <NUM> of <FIG>.

Referring to <FIG>, according to an embodiment, the electronic device <NUM> may include the configuration shown in <FIG> and may include a structure where the stylus pen <NUM> may be inserted. The electronic device <NUM> may include a housing <NUM>, and a hole <NUM> may be formed in a portion of the housing <NUM>, e.g., a portion of a side surface 210a. The electronic device <NUM> may include a first inner space <NUM> which may include a storage space connected with the hole <NUM>, and the stylus pen <NUM> may be inserted into the first inner space <NUM>. In the example embodiment shown, the stylus pen <NUM> may have a pressable first button 201a at an end thereof to be easily pulled out of the first inner space <NUM> of the electronic device <NUM>. When the first button 201a is pressed, a repulsive mechanism (e.g., at least one elastic member, e.g., a spring) configured in association with the first button 201a may be operated to allow the stylus pen <NUM> to be removed from the first inner space <NUM>.

<FIG> is a block diagram illustrating an example stylus pen (e.g., the stylus pen <NUM> of <FIG>) according to an embodiment.

Referring to <FIG>, according to an embodiment, the stylus pen <NUM> may include a processor (e.g., including processing circuitry) <NUM>, a memory <NUM>, a resonance circuit <NUM>, a charging circuit <NUM>, a battery <NUM>, a communication circuit <NUM>, an antenna <NUM>, a trigger circuit <NUM>, and/or a sensor <NUM>. According to an embodiment, the processor <NUM>, at least part of the resonance circuit <NUM>, and/or at least part of the communication circuit <NUM> of the stylus pen <NUM> may be configured in the form of a chip or on a printed circuit board. The processor <NUM>, the resonance circuit <NUM>, and/or the communication circuit <NUM> may be electrically connected with the memory <NUM>, the charging circuit <NUM>, the battery <NUM>, the antenna <NUM>, the trigger circuit <NUM>, and/or the sensor <NUM>.

According to an embodiment, the processor <NUM> may include various processing circuitry, including, for example, and without limitation, a customized hardware module or a generic processor configured to execute software (e.g., an application program). The processor <NUM> may include a hardware component (function) and/or software element (program) including at least one of a communication module or a module to manage the state or environment of the stylus pen <NUM>, an input/output interface, a data measuring module, and various sensors provided in the stylus pen <NUM>. The processor <NUM> may include, e.g., a hardware module, a software module, a firmware module, or a combination of two or more thereof. According to an embodiment, the processor <NUM> may be configured to transmit, through the communication circuit <NUM> to the electronic device <NUM>, information indicating a pressing state of a button (e.g., the button <NUM> of <FIG>), sensing information obtained by the sensor <NUM>, and/or information (e.g., information associated with the position of the stylus pen <NUM>) calculated (or determined) based on the sensing information.

According to an embodiment, the resonance circuit <NUM> may resonate based on an electromagnetic field signal generated from a digitizer (e.g., the display device <NUM>) of the electronic device <NUM> and may radiate an electromagnetic resonance (EMR) input signal (or magnetic field) by the resonance. The electronic device <NUM> may identify the position of the stylus pen <NUM> over the electronic device <NUM> using the EMR input signal. For example, the electronic device <NUM> may identify the position of the stylus pen <NUM> based on the magnitude of the electromotive force (e.g., output current) generated by the EMR input signal at each of a plurality of channels (e.g., a plurality of loop coils) in the digitizer. Although the electronic device <NUM> and the stylus pen <NUM> are described as operated based on the EMR scheme, this is merely an example, and the disclosure is not limited thereto. For example, the electronic device <NUM> may generate an electrical field-based signal based on an electrically coupled resonance (ECR) scheme. The resonance circuit of the stylus pen <NUM> may be resonated by the electric field. The electronic device <NUM> may identify the electric potential at the plurality of channels (e.g., electrodes) by the resonance of the stylus pen <NUM> and may identify the position of the stylus pen <NUM> based on the electric potential. The stylus pen <NUM> may be implemented in an active electrostatic (AES) scheme, and it will be easily appreciated by one of ordinary skill in the art that it is not limited to a specific kind of implementation. Further, the electronic device <NUM> may detect the stylus pen <NUM> based on a variation in capacitance (self-capacitance or mutual capacitance) associated with at least one electrode of the touch panel. In this example, the stylus pen <NUM> may not include the resonance circuit.

According to an embodiment, the memory <NUM> may store information related to the operation of the stylus pen <NUM>. For example, the information may include information for communicating with the electronic device <NUM> and frequency information related to the input operation of the stylus pen <NUM>. The memory <NUM> may store a program (or application, algorithm, or processing loop) for calculating (or determining) information (e.g., coordinate information and/or displacement information) about the position of the stylus pen <NUM> from the sensing data obtained by the sensor <NUM>. The memory <NUM> may store the communication stack of the communication circuit <NUM>. According to an implementation, the communication circuit <NUM> and/or processor <NUM> may include a dedicated memory.

According to an embodiment, the resonance circuit <NUM> may include a coil (or inductor) and/or capacitor. The resonance circuit <NUM> may be resonated based on an input electric field and/or magnetic field (e.g., an electric field and/or magnetic field generated from the digitizer of the electronic device <NUM>). For example, when the stylus pen <NUM> transmits signals via the EMR scheme, the stylus pen <NUM> may generate a signal having a resonance frequency based on an electromagnetic field generated from the inductive panel of the electronic device <NUM>. When the stylus pen <NUM> transmits signals via the AES scheme, the stylus pen <NUM> may generate a signal using a capacitive coupling with the electronic device <NUM>. When the stylus pen <NUM> transmits signals via the ECR scheme, the stylus pen <NUM> may generate a signal having a resonance frequency based on an electric field generated from a capacitive device of the electronic device. According to an embodiment, the resonance circuit <NUM> may be used to vary the frequency or strength of electromagnetic field according to the user's manipulation state. For example, the resonance circuit <NUM> may provide various frequencies to recognize a hovering input, drawing input, button input, or erasing input. For example, the resonance circuit <NUM> may provide various resonance frequencies according to combinations of connections of a plurality of capacitors or based on a variable inductor and/or variable capacitor.

According to an embodiment, when connected with the resonance circuit <NUM> based on a switching circuit, the charging circuit <NUM> may, for example, rectify a resonance signal generated from the resonance circuit <NUM> into a direct current (DC) signal and provide the DC signal to the battery <NUM>. According to an embodiment, the stylus pen <NUM> may identify whether the stylus pen <NUM> is inserted into the electronic device <NUM> using a voltage level of a DC signal sensed by the charging circuit <NUM>. The stylus pen <NUM> may identify the pattern corresponding to the signal identified by the charging circuit <NUM>, thereby identifying whether the stylus pen <NUM> has been inserted.

According to an embodiment, the battery <NUM> may be configured to store power required to operate the stylus pen <NUM>. The battery <NUM> may include, e.g., a lithium-ion battery or a capacitor, or the like, and may be recharged or replaced. According to an embodiment, the battery <NUM> may be charged with power (e.g., DC signal (DC power)) received from the charging circuit <NUM>.

According to an embodiment, the communication circuit <NUM> may be configured to perform wireless communication between the stylus pen <NUM> and the communication module <NUM> of the electronic device <NUM>. According to an embodiment, the communication circuit <NUM> may transmit state information about the stylus pen <NUM>, input information, and/or position-related information to the electronic device <NUM> using a short-range communication scheme. For example, the communication circuit <NUM> may transmit direction information (e.g., motion sensor data) about the stylus pen <NUM> obtained through the trigger circuit <NUM>, voice information entered through the microphone, or remaining power information about the battery <NUM> to the electronic device <NUM>. For example, the communication circuit <NUM> may transmit the sensing data obtained from the sensor <NUM> and/or information associated with the position of the stylus pen <NUM>, identified based on the sensing data, to the electronic device <NUM>. For example, the communication circuit <NUM> may transmit information about the state of a button (e.g., the button <NUM> of <FIG>) of the stylus pen <NUM> to the electronic device <NUM>. As an example, the short-range communication scheme may include, but is not limited to, Bluetooth, Bluetooth low energy (BLE), near-field communication (NFC), wireless-fidelity (Wi-Fi) direct, or the like.

According to an embodiment, the antenna <NUM> may be used to transmit signals or power to the outside (e.g., the electronic device <NUM>) or receive signals or power from the outside. According to an embodiment, the stylus pen <NUM> may include a plurality of antennas <NUM> and select at least one antenna <NUM> appropriate for the communication scheme from among the plurality of antennas. The communication circuit <NUM> may exchange signals or power with an external electronic device through the at least one selected antenna <NUM>.

According to an embodiment, the trigger circuit <NUM> may include, for example, at least one button or sensor circuit. According to an embodiment, the processor <NUM> may identify the input scheme (e.g., touch or press) or kind (e.g., EMR button or BLE button) of the button of the stylus pen <NUM>. According to an embodiment, the trigger circuit <NUM> may transmit a trigger signal to the electronic device <NUM> using, for example, and without limitation, a signal through a sensor <NUM> or a button input signal.

According to an embodiment, the sensor <NUM> may include, for example, and without limitation, an accelerometer, a gyro sensor, and/or a geomagnetic sensor, or the like. The accelerometer may, for example, sense linear motion of the stylus pen <NUM> and/or information about the acceleration on the three axes of the stylus pen <NUM>. The gyro sensor may, for example, sense information related to the rotation of the stylus pen <NUM>. The geomagnetic sensor may sense information about the direction of the stylus pen <NUM> in an absolute coordinate system. According to an embodiment, the sensor <NUM> may include a sensor capable of generating an electric signal or data value corresponding to the internal operation status or external environment of the stylus pen <NUM>, such as, e.g., a remaining battery capacity sensor, pressure sensor, optical sensor, temperature sensor, biometric sensor, etc., as well as the sensor for measuring the motion. According to an embodiment, the processor <NUM> may transmit the information obtained from the sensor <NUM> through the communication circuit <NUM> to the electronic device <NUM>. The processor <NUM> may transmit information (e.g., the coordinates of the stylus pen <NUM> and/or the displacement of the stylus pen <NUM>) associated with the position of the stylus pen <NUM> based on the information obtained from the sensor <NUM> through the communication circuit <NUM> to the electronic device <NUM>.

<FIG> is an exploded perspective view illustrating an example stylus pen (e.g., the stylus pen <NUM> of <FIG>) according to an embodiment.

Referring to <FIG>, the stylus pen <NUM> may include a pen housing <NUM> forming the outer appearance of the stylus pen <NUM> and an inner assembly inside the pen housing <NUM>. In the example embodiment shown, the inner assembly may be inserted into the pen housing <NUM>, with several parts mounted inside the stylus pen <NUM> assembled together, by, for example, a single assembly operation.

The pen housing <NUM> may include an elongate second internal space <NUM> between a first end 300a, a middle portion 300c, and a second end 300b. The cross section of the pen housing <NUM> may, for example, be shaped as an ellipse with a longer axis and a shorter axis and may overall be shaped as an elliptical cylinder. As described above in connection with <FIG>, the first inner space <NUM> of the electronic device <NUM> may have an elliptical cross section corresponding to the shape of the pen housing <NUM>. According to an embodiment, the pen housing <NUM> may at least partially include a synthetic resin (e.g., plastic) and/or a metal (e.g., aluminum). According to an embodiment, the first end 300a of the pen housing <NUM> may be formed of a synthetic resin. Other various embodiments may be applied to the material of the pen housing <NUM>, and it will be understood that the disclosure is not limited to the above examples.

The inner assembly may be elongated corresponding to the shape of the pen housing <NUM>. The inner assembly may largely be divided into three components along the lengthwise direction. For example, the inner assembly may include a coil part <NUM> disposed in a position corresponding to the first end 300a of the pen housing <NUM>, an ejection member <NUM> disposed in a position corresponding to the second end 300b of the pen housing <NUM>, and a circuit board part <NUM> disposed in a position corresponding to the body of the pen housing <NUM>.

The coil part <NUM> may include a pen tip <NUM>, which is exposed to the outside of the first end 300a when the inner assembly is fully inserted into the pen housing <NUM>, a packing ring <NUM>, a coil <NUM> wound multiple times, and/or a pen pressure sensor <NUM> to obtain variations in pressure when the pen tip <NUM> is pressurized. The packing ring <NUM> may include, for example, and without limitation, epoxy, rubber, urethane, silicone, or the like. The packing ring <NUM> may be provided for waterproof or dustproof purposes and protect the coil part <NUM> and the circuit board part <NUM> from water or dust. According to an embodiment, the coil <NUM> may form a resonance frequency within, for example, a preset frequency band (e.g., <NUM>) and may be combined with at least one device (e.g., a capacitor) to adjust the resonance frequency produced by the coil <NUM> within a predetermined range.

The ejection member <NUM> may include a configuration to pull the stylus pen <NUM> out of the first inner space <NUM> of the electronic device (e.g., <NUM> of <FIG>). According to an embodiment, the ejection member <NUM> may include a shaft <NUM>, an ejection body <NUM> disposed around the shaft <NUM> to form the overall outer appearance of the ejection member <NUM>, and a button part <NUM> (e.g., the first button 201a of <FIG>). When the inner assembly is fully inserted into the pen housing <NUM>, the portion including the shaft <NUM> and the ejection body <NUM> may be surrounded by the second end 300b of the pen housing <NUM>, and at least part of the button part <NUM> may be exposed to the outside of the second end 300b. A plurality of parts (not shown), e.g., cam members or elastic members, may be disposed in the ejection body <NUM> to form a push-pull structure. According to an embodiment, the button part <NUM> may substantially be coupled with the shaft <NUM> to linearly move back and forth along the ejection body <NUM>. According to an embodiment, the button part <NUM> may include a button with a jaw to allow the user to pull out the stylus pen <NUM> with a fingernail. According to an embodiment, the stylus pen <NUM> may include a sensor to detect the linear motion of the shaft <NUM> to thereby provide another input scheme.

The circuit board part <NUM> may include a printed circuit board <NUM>, a base <NUM> surrounding at least one surface of the printed circuit board <NUM>, and an antenna. According to an embodiment, a board seating part <NUM> may be formed on top of the base <NUM> to allow the printed circuit board <NUM> to rest, and the printed circuit board <NUM> may be seated and fastened onto the board seating part <NUM>. According to an embodiment, the printed circuit board <NUM> may include a first surface and a second surface. A variable capacitor or a switch <NUM>, which is connected with the coil <NUM>, may be disposed on the first surface, and a charging circuit, a battery <NUM>, or a communication circuit may be disposed on the second surface. According to an embodiment, the first surface and the second surface of the printed circuit board <NUM> may denote different surfaces stacked one over another, and in other embodiments, the first surface and the second surface may refer, for example, to different portions of the printed circuit board which are disposed along the lengthwise direction of the printed circuit board <NUM>. The battery <NUM> may include, for example, an electric double layered capacitor (EDLC). The charging circuit may be positioned between the coil <NUM> and the battery and may include a voltage detector circuit and a rectifier. The battery <NUM> may not necessarily be disposed on the second surface of the printed circuit board <NUM>. The position of the battery <NUM> may be set to various ones depending on various mounting structures of the circuit board <NUM> and may be different from the position shown in the drawings.

The antenna may include an antenna structure <NUM> as shown in <FIG> and/or an antenna embedded in the printed circuit board <NUM>. According to an embodiment, a switch <NUM> may be provided on the printed circuit board <NUM>. A second button <NUM> provided to the stylus pen <NUM> may be used to press the switch <NUM> and may be exposed to the outside through a side opening <NUM> of the pen housing <NUM>. The second button <NUM> may be supported by the supporting member <NUM> and, if no external force is applied to the second button <NUM>, the supporting member <NUM> may provide an elastic restoration force to allow the second button <NUM> to remain or go back to a predetermined position. The second button <NUM> may be implemented, for example, and without limitation, as any one of a physical key, touch key, motion key, pressure key, or keyless, but not limited to a specific type of implementation.

The circuit board part <NUM> may include a packing ring such as an O-ring. According to an embodiment, O-rings may be disposed at both ends of the base <NUM>, thereby forming a sealing structure between the base <NUM> and the pen housing <NUM>. According to an embodiment, the supporting member <NUM> may partially come in tight contact with the inner wall of the pen housing <NUM> around the side opening <NUM>, thereby forming a sealing structure. For example, at least part of the circuit board part <NUM> may also include a waterproof, dustproof structure similar to the packing ring <NUM> of the coil part <NUM>.

The stylus pen <NUM> may include a battery seating part 333a on the top surface of the base <NUM> to allow the battery <NUM> to sit thereon. The battery <NUM> mountable on the battery seating part 333a may include, e.g., a cylinder-type battery.

The stylus pen <NUM> may include a microphone (not shown) and/or speaker. The microphone and/or speaker may be connected directly to the printed circuit board <NUM> or to a separate flexible printed circuit board (FPCB) (not shown) connected with the printed circuit board <NUM>. According to an embodiment, the microphone and/or speaker may be disposed in a position parallel with the second button <NUM> along the longer direction of the stylus pen <NUM>.

<FIG> is a diagram illustrating an example configuration of an electronic device and stylus pen according to an embodiment.

According to an embodiment, the electronic device <NUM> may include a pen controller <NUM>. The pen controller <NUM> may include, for example, at least one amplifier connected with, e.g., at least one coil <NUM> and <NUM>. The pen controller <NUM> may provide charging power to the stylus pen <NUM> via the at least one coil <NUM> and <NUM>. The at least one coil <NUM> and <NUM> may be positioned adjacent to the coil <NUM> of the stylus pen <NUM> when the stylus pen <NUM> is in the receiving space of the electronic device <NUM>, but its position is not limited thereto. Insertion into the receiving space is merely an example. For example, the electronic device <NUM> may have an area (or space) where the stylus pen <NUM> may be mounted (or attached) in which case the stylus pen <NUM> may be attached to or detached from the area (or space). According to an embodiment, it will be easily appreciated by one of ordinary skill in the art that the operations when the stylus pen <NUM> is positioned in the receiving space may be performed when the stylus pen <NUM> is attached to a mounting area (or space). At least some functions of the pen controller <NUM> may be performed by the processor <NUM>, or the pen controller <NUM> and the processor <NUM> may be integrated together. The pen controller <NUM> may be integrated with a sensing panel controller described below. As described herein, when the pen controller <NUM> performs a specific operation, it may also refer, for example, to the specific operation being performed by the processor <NUM> or by a control circuit independent from the processor <NUM>. The pen controller <NUM> may include a control circuit (e.g., a control circuit independent from the processor <NUM>), an inverter, and/or an amplifier, as well as the at least one coil <NUM> and <NUM>, but is not limited thereto. As described above, the pen controller <NUM> may include no control circuit in which case a signal for charging may be provided to the at least one coil <NUM> and <NUM> under the control of the processor <NUM>.

According to an embodiment, the pen controller <NUM> may provide a signal with a pattern via the at least one coil <NUM> and <NUM>. The pattern may be previously shared with the stylus pen <NUM> for controlling the stylus pen <NUM> and may include, but is not limited to, a charging initiation indication pattern, a charging termination indication pattern, a detection pattern, or the like. Although two coils <NUM> and <NUM> are shown to provide a charging signal or pattern signal for control, this is merely an example, and the number of the coils is not limited thereto.

According to an embodiment, the resonance circuit <NUM> (e.g., the resonance circuit <NUM> of <FIG>) of the stylus pen <NUM> may include a coil <NUM>, at least one capacitor <NUM> and <NUM>, and/or a switch <NUM>. When the switch <NUM> is in an off state, the coil <NUM> and the capacitor <NUM> may form a resonance circuit and, when the switch <NUM> is in an on state, the coil <NUM> and the capacitors <NUM> and <NUM> may form a resonance circuit. Thus, the resonance frequency of the resonance circuit <NUM> may be varied depending on the on/off state of the switch <NUM>. For example, the electronic device <NUM> may identify the on/off state of the switch <NUM> based on the frequency of a signal from the stylus pen <NUM>. For example, when the button <NUM> of the stylus pen <NUM> is pressed/released, the switch <NUM> may be turned on/off, and the electronic device <NUM> may identify whether the button <NUM> of the stylus pen <NUM> is pressed based on the frequency of a reception signal identified via the digitizer.

According to an embodiment, at least one rectifier <NUM> and <NUM> may rectify an alternating current (AC) waveform of signal VPEN output from the resonance circuit <NUM> and output the rectified signal. The charging switch controller SWchg ctrl <NUM> may receive the rectified signal VM output from the rectifier <NUM>. Based on the rectified signal VM, the charging switch controller <NUM> may identify whether the signal generated from the resonance circuit is a signal for charging or a signal for detecting the position. For example, the charging switch controller <NUM> may identify whether the signal generated from the resonance circuit is a signal for charging or a signal for detecting the position based on, e.g., the magnitude of the voltage of the rectified signal VM. The charging switch controller <NUM> may identify whether a signal with a charging initiation pattern is input based on the waveform of the rectified signal VM.

According to an embodiment, upon identifying that that the signal is a signal for charging, the charging switch controller <NUM> may turn on the charging switch SWchg <NUM>. Upon detecting a signal with the charging initiation pattern, the charging switch controller <NUM> may turn on the charging switch SWchg <NUM>. The charging switch controller <NUM> may transfer a charging initiation signal chg_on to the charging switch <NUM>. In this example, the rectified signal VIN may be transferred through the charging switch <NUM> to a battery <NUM> (e.g., the battery <NUM> of <FIG>). The battery <NUM> may be charged with the received rectified signal VIN. An over-voltage protection circuit (OVP) <NUM> may identify the battery voltage VBAT and, when the battery voltage exceeds an over-voltage threshold, turn off the charging switch <NUM>.

According to an embodiment, a load switch controller SWL ctrl <NUM>, upon identifying that the battery voltage exceeds an operation voltage threshold, may turn on a load switch SWL <NUM>. When the load switch <NUM> turns on, power from the battery <NUM> may be transferred to the BLE communication circuit and controller (BLE + controller) <NUM> (e.g., the communication circuit <NUM> and processor <NUM> of <FIG>). The BLE communication circuit and controller <NUM> may be operated using the received power. When the distance between the stylus pen <NUM> and the electronic device <NUM> is larger than a threshold distance, a button control circuit <NUM> may transfer information about an input of the button (e.g., the button <NUM>) to the BLE communication circuit and controller <NUM>. The BLE communication circuit and controller <NUM> may transmit the received button input information through the antenna <NUM> (e.g., the antenna <NUM> of <FIG>) to the electronic device <NUM>. A sensor <NUM> (e.g., the sensor <NUM> of <FIG>) may include a gyro sensor <NUM> and/or an accelerometer <NUM>. Sensing data obtained by the gyro sensor <NUM> and/or the accelerometer <NUM> may be transferred to the BLE communication circuit and controller <NUM>. The BLE communication circuit and controller <NUM> may transmit a communication signal including the received sending data through the antenna <NUM> to the electronic device <NUM>. The BLE communication circuit and controller <NUM> may identify information (e.g., the coordinates and/or displacement of the stylus pen <NUM>) associated with the position of the stylus pen <NUM> identified based on the received sending data. The BLE communication circuit and controller <NUM> may transmit the identified information associated with the position of the stylus pen <NUM> through the antenna <NUM> to the electronic device <NUM>. According to an embodiment, when the stylus pen <NUM> is removed from the electronic device <NUM>, the BLE communication circuit and controller <NUM> may activate the accelerometer <NUM>. When the button (e.g., the button <NUM>) is pressed, the BLE communication circuit and controller <NUM> may activate the gyro sensor <NUM>. The time of activation is merely an example, and no limitation is posed on the time of activation per sensor. Further, the sensor <NUM> may further include a geomagnetic sensor. When only the accelerometer <NUM> is activated, the stylus pen <NUM> may provide acceleration information measured by the accelerometer <NUM> to the electronic device <NUM>, and the electronic device <NUM> may be operated based on both the acceleration information and the position of the stylus pen <NUM> identified based on the pen signal.

<FIG> is a diagram illustrating an example configuration of an electronic device according to an embodiment.

According to an embodiment, an electronic device <NUM> may include a sensing panel controller (e.g., sensing panel control circuitry) <NUM>, a processor (e.g., including processing circuitry) <NUM> (e.g., the processor <NUM>), a Bluetooth controller (e.g., including Bluetooth control circuitry) <NUM> (e.g., the communication module <NUM>), and/or an antenna <NUM>. The electronic device <NUM> may include a sensing panel <NUM>, a display assembly <NUM> disposed on the sensing panel <NUM>, and/or a window <NUM> disposed on the display assembly <NUM>. According to an example implementation, when the sensing panel <NUM> may be implemented as a digitizer, a touch sensor panel may further be disposed thereover or thereunder to sense the user's touch. The touch sensor panel may be positioned on the display assembly <NUM>, according to an implementation. As described above, the sensing panel <NUM> may be implemented as a digitizer and may include a plurality of loop coils. According to an embodiment, when implemented as a digitizer, the sensing panel <NUM> may include an element (e.g., an amplifier) for applying electrical signals (e.g., transmission signals) to the loop coils. The sensing panel <NUM> may include an element (e.g., an amplifier, capacitor, or analog-digital converter (ADC)) for processing signals (e.g., input signals) output from the loop coils. The sensing panel <NUM> may identify the position of the stylus pen <NUM> based on the magnitudes (e.g., digital values converted into per channel) of signals output from the loop coils and output the position to the processor <NUM>. According to an implementation, the processor <NUM> may include various processing circuitry and identify the position of the stylus pen <NUM> based on the magnitudes (e.g., digital values converted into per channel) output from the loop coils. For example, the sensing panel <NUM> may apply a current to at least one of the loop coils, and the at least one coil may create a magnetic field. The stylus pen <NUM> may be resonated by the magnetic field created around, and a magnetic field may be created by the resonance from the stylus pen <NUM>. By the magnetic field created from the stylus pen <NUM>, a current may be output from each of the loop coils. The electronic device <NUM> may identify the position of the stylus pen <NUM> based on the per-channel current magnitudes (e.g., digital values converted into) of the loop coils. To determine the position of the stylus pen <NUM>, the loop coils may include coils extending in one axial (e.g., the x axis) direction and coils extending in another axial (e.g., the y axis) direction, but their array is not limited to any specific one. The sensing panel controller <NUM> may apply transmission signals Tx to at least some of the plurality of loop coils of the sensing panel <NUM>, and the loop coils receiving the transmit signals Tx may create a magnetic field. The sensing panel controller <NUM> may receive reception signals Rx from at least some of the plurality of loop coils in a time-division manner. The sensing panel controller <NUM> may identify the position of the stylus pen <NUM> based on the reception signal Rx and transfer the position of the stylus pen <NUM> to the processor <NUM>. For example, the magnitude of the reception signal Rx may differ per loop coil (e.g., per channel), and the position of the stylus pen <NUM> may be identified based on the magnitudes of the received signals. The electronic device <NUM> may identify whether the button (e.g., the button <NUM>) of the stylus pen <NUM> is pressed based on the frequency of the received signal. For example, when the frequency of the received signal is a first frequency, the electronic device <NUM> may identify that the button of the stylus pen <NUM> has been pressed and, when the frequency of the received signal is a second frequency, the electronic device <NUM> may identify that the button of the stylus pen <NUM> has been released. When the sensing panel is implemented as a touch sensing panel (e.g., a touchscreen panel (TSP)), the sensing panel <NUM> may identify the position of the stylus pen <NUM> based on a signal output from an electrode. The electronic device <NUM> may detect the pen based on a variation in capacitance (e.g., mutual capacitance and/or self-capacitance) at the electrode of the sensing panel <NUM>. A digitizer or hardware capable of sensing a pen signal from the stylus pen of the touch sensing panel may be denoted as the sensing panel <NUM>. When the position of the stylus pen <NUM> is identified by the touch sensing panel, the electronic device <NUM> may identify whether the button is pressed based on the received communication signal. According to an embodiment, the electronic device <NUM> may recognize static electricity based on an AES scheme, thereby detecting the stylus pen (or the position of the stylus pen).

The sensing panel controller <NUM> may identify whether the stylus pen <NUM> is inserted into the electronic device <NUM> (or combined or attached) based on the received signal and transfer the same to the processor <NUM>. According to an implementation, the sensing panel controller <NUM> may be integrated with the sensing panel <NUM>. The processor <NUM> may transmit a signal for wireless charging based on whether the stylus pen <NUM> is inserted. The processor <NUM> may control the Bluetooth controller <NUM> based on whether the stylus pen <NUM> is inserted and, when no wireless communication connection is formed, control it to form a wireless communication connection to the stylus pen <NUM>. When the stylus pen <NUM> is inserted, the processor <NUM> may transmit charging capacity information to the electronic device <NUM> and, when the stylus pen <NUM> is removed, transmit information about a pressing of the button or sensor data to the electronic device <NUM>. The processor <NUM> may perform control to transmit a charging signal and control signal to the sensing panel controller <NUM> based on the data received from the stylus pen <NUM>. The processor <NUM> may identify the gesture of the stylus pen <NUM> based on the data received from the stylus pen <NUM> and perform an operation corresponding to the gesture. The processor <NUM> may transfer a function mapped to the gesture to an application. The Bluetooth controller <NUM> may transmit/receive information to/from the stylus pen <NUM> via the antenna <NUM>. The display assembly <NUM> may include an element for displaying a screen. The window <NUM> may be formed of a transparent material to allow at least part of the display assembly <NUM> to be visually exposed.

<FIG> is a flow diagram illustrating example operations of a stylus pen and an electronic device when the stylus pen is inserted into the electronic device, according to an embodiment.

According to an embodiment, in operation <NUM>, the stylus pen <NUM> may be inserted into the receiving space of the electronic device <NUM>. For example, the user may insert the stylus pen <NUM> into the receiving space of the electronic device <NUM>, and this operation is shown in dashed lines based on not being an active operation of the stylus pen <NUM>. The embodiment of <FIG> may refer to an example in which the stylus pen <NUM> is inserted into the electronic device <NUM> before a communication connection is formed between the stylus pen <NUM> and the electronic device <NUM>. As described herein, when the electronic device <NUM> or stylus pen <NUM> performs a specific operation, this may refer, for example, to the processor <NUM> included in the electronic device <NUM> or the processor <NUM> included in the stylus pen <NUM> performing the specific operation. When the electronic device <NUM> or stylus pen <NUM> performs a specific operation, this may refer, for example, to the processor <NUM> included in the electronic device <NUM> or the processor <NUM> included in the stylus pen <NUM> controlling other hardware to perform the specific operation. When the electronic device <NUM> or stylus pen <NUM> performs a specific operation, this may refer, for example, to the instructions stored in the memory being executed or stored to enable the processor <NUM> included in the electronic device <NUM> or the processor <NUM> included in the stylus pen <NUM> to perform the specific operation.

According to an embodiment, in operation <NUM>, the electronic device <NUM> may detect an insertion of the stylus pen <NUM>. For example, the electronic device <NUM> may detect an insertion of the stylus pen <NUM> based on a reception signal received from the stylus pen <NUM> in response to a transmission signal transmitted through the digitizer, but it will be easily appreciated by one of ordinary skill in the art that detection of insertion is not limited to a specific scheme. In operation <NUM>, the electronic device <NUM> may perform an initialization operation. For example, the electronic device <NUM> may transfer a reset command to the stylus pen <NUM>. In operation <NUM>, the stylus pen <NUM> may perform the reset operation. For example, the stylus pen <NUM> may release an existing BLE connection. In operation <NUM>, the stylus pen <NUM> may perform an advertising operation. For example, the stylus pen <NUM> may broadcast advertisement signals. In operation <NUM>, the electronic device <NUM> may identify the inserted stylus pen <NUM>. The electronic device <NUM> may identify the inserted stylus pen <NUM> based on the received advertisement signal. In operation <NUM>, the electronic device <NUM> may send a request for communication connection. For example, the electronic device <NUM> may transmit a connection request signal corresponding to the advertisement signal. In operation <NUM>, the stylus pen <NUM> may form a communication connection with the electronic device <NUM>.

<FIG> is a flow diagram illustrating example operations of a stylus pen and an electronic device when the stylus pen is removed from the electronic device, according to an embodiment.

According to an embodiment, in operation <NUM>, the stylus pen <NUM> may be removed from the receiving space of the electronic device <NUM>. For example, the user may pull the stylus pen <NUM> out of the receiving space of the electronic device <NUM>. In operation <NUM>, the electronic device <NUM> may detect the removal of the stylus pen <NUM>. For example, the electronic device <NUM> may detect the removal of the stylus pen <NUM> based on failure to receive a signal from the stylus pen <NUM>, but not limited to a specific method for detecting the removal. In operation <NUM>, the stylus pen <NUM> may detect the removal of the stylus pen <NUM>. For example, the stylus pen <NUM> may detect the removal of the stylus pen <NUM> based on failure to receive a signal from the electronic device <NUM>, but it is not limited to a specific method for detecting the removal. Upon detecting the removal, the stylus pen <NUM> may exchange parameters (e.g., connection interval and/or slave latency) with the electronic device <NUM>.

According to an embodiment, the stylus pen <NUM> may activate the accelerometer based on detection of the removal in operation <NUM>. The stylus pen <NUM> may sense acceleration information about the stylus pen <NUM> via the activated accelerometer in operation <NUM>. Although not shown, the stylus pen <NUM> may transmit the sensed acceleration information to the electronic device <NUM>. According to an embodiment, the electronic device <NUM> may perform an operation based on the received acceleration information. According to an embodiment, the stylus pen <NUM> may be configured to activate the accelerometer while keeping the gyro sensor, which consumes relatively high power, inactive.

According to an embodiment, the stylus pen <NUM> may identify an input of the button (e.g., the button <NUM>) in operation <NUM>. The button may be implemented, for example, and without limitation, as any one of a physical key, touch key, motion key, pressure key, keyless, or the like, but not limited to a specific type of implementation. Upon identifying a button input, the stylus pen <NUM> may activate the gyro sensor in operation <NUM>. The stylus pen <NUM> may sense rotation information via the activated gyro sensor in operation <NUM>. In operation <NUM>, the stylus pen <NUM> may transmit information based on the result of sensing. For example, the stylus pen <NUM> may transmit sensing information obtained via the accelerometer and gyro sensor to the electronic device <NUM>. The stylus pen <NUM> may identify the coordinates (e.g., two-dimensional coordinates or three-dimensional coordinates) of the stylus pen <NUM> based on the sensing information obtained via the accelerometer and gyro sensor and transmit the identified coordinates to the electronic device <NUM>. The stylus pen <NUM> may identify displacement information about the coordinates (e.g., two-dimensional coordinates or three-dimensional coordinates) of the stylus pen <NUM> based on the sensing information obtained via the accelerometer and gyro sensor and transmit the identified displacement information to the electronic device <NUM>. In operation <NUM>, the electronic device <NUM> may perform an operation based on the received information. Upon receiving the sensing information, the electronic device <NUM> may identify the position information about the stylus pen <NUM> based on the sensing information, identify a gesture corresponding to the position information, and perform an operation corresponding to the gesture. Upon receiving the position information about the stylus pen <NUM>, the electronic device <NUM> may identify the gesture corresponding to the position information and perform an operation corresponding to the gesture. For example, the stylus pen <NUM> may transmit information to the electronic device <NUM> until the pen button input is released. The electronic device <NUM> may identify the gesture based on the position information about the stylus pen <NUM> identified until the release of the button input is detected. Upon detecting the release of the button input, the stylus pen <NUM> may again deactivate the gyro sensor. According to an embodiment, the stylus pen <NUM> may activate both the gyro sensor and the accelerometer from the time of detecting removal. In this example, the position information about the stylus pen <NUM> before the button input may be used to correct the direction of gesture, allowing for better accuracy for gesture recognition. For example, the electronic device <NUM> may identify initial posture information about the stylus pen <NUM> and recognize the gesture using a displacement based on the initial posture information.

<FIG> is a flow diagram illustrating example operations of an electronic device and a stylus pen when the stylus pen is inserted, according to an embodiment.

According to an embodiment, in operation <NUM>, the stylus pen <NUM> may be inserted into the receiving space of the electronic device <NUM>. For example, after its initial insertion, the stylus pen <NUM> may be removed from, or inserted back into, the receiving space. In operation <NUM>, the electronic device <NUM> may detect the insertion of the stylus pen <NUM>. In operation <NUM>, the electronic device <NUM> may command the stylus pen <NUM> to activate charging. The electronic device <NUM> may command to activate charging based on transmission of, e.g., a signal with a pattern via a receiving space coil or a communication signal via the communication module. In operation <NUM>, the stylus pen <NUM> may initiate a charging mode. In operation <NUM>, the stylus pen <NUM> may detect an insertion of the stylus pen <NUM>. The stylus pen <NUM> may identify whether it is inserted based on information received from the electronic device <NUM> or the magnitude of voltage applied to the resonance circuit (or output terminal of the rectifier) of the stylus pen <NUM>. In operation <NUM>, the stylus pen <NUM> may deactivate the sensors. The stylus pen <NUM> may deactivate some sensors or be configured to skip sensor deactivation. In operation <NUM>, the electronic device <NUM> and the stylus pen <NUM> may perform charging. According to an embodiment, charging <NUM> may be performed immediately after the charging mode is initiated in operation <NUM>, but the time of performing charging is not limited to a specific time.

<FIG> is a flowchart illustrating a method for operating an electronic device according to the invention,.

According to <FIG>, in operation <NUM>, the electronic device <NUM> may identify a gesture initiation event. For example, the electronic device <NUM> may identify the gesture initiation event based on information included in the communication signal from the stylus pen <NUM>. The gesture initiation event may include, for example, detection of the pressed state of the button (e.g., the button <NUM>) of the stylus pen <NUM>. Upon identifying the pressed state of the button, the stylus pen <NUM> may transmit a communication signal including information indicating the pressed state of the button to the electronic device <NUM>. The electronic device <NUM> may identify the gesture initiation event based on the information included in the received communication signal, but identifying the gesture initiation event is not limited to a specific scheme.

According to <FIG>, in operation <NUM>, the electronic device <NUM> may identify whether a pen signal is detected. For example, the electronic device <NUM> may apply a transmission signal to the loop coil included in the digitizer. After applying the transmission signal, the electronic device <NUM> may identify that a pen signal is detected when the magnitude of a signal output from the loop coil included in the digitizer is a threshold magnitude or more. When the magnitude of a signal output from the loop coil included in the digitizer is less than the threshold magnitude, the electronic device <NUM> may identify that no pen signal is detected. When the stylus pen <NUM> is positioned near the electronic device <NUM>, the resonance circuit of the stylus pen <NUM> may be resonated by a signal from the loop coil included in the digitizer. The signal (e.g., an EMR signal) generated by resonance may create an induced electromotive force around the loop coil included in the digitizer, so that a signal may be output from each loop coil. When the distance between the electronic device <NUM> and the stylus pen <NUM> is relatively large, the magnitude of the signal output from the loop coil may be relatively small and, when the distance between the electronic device <NUM> and the stylus pen <NUM> is relatively small, the magnitude of the signal output from the loop coil may be relatively large. Thus, the electronic device <NUM> may identify that a pen signal is detected when the magnitude of a signal output from the loop coil is a threshold magnitude or more. When the electronic device <NUM> is implemented to identify the position of the stylus pen <NUM> in an ECR scheme or type-C scheme, the electronic device <NUM> may detect the pen when a variation in the capacitance (e.g., self-capacitance or mutual capacitance) of the touch panel is a threshold variation or more, and such case may also be represented as having detected a pen signal.

Upon identifying that a pen signal is detected (yes in operation <NUM>), the electronic device <NUM> may perform a first operation corresponding to the pen signal in operation <NUM>. The electronic device <NUM> may identify the position of the stylus pen <NUM> over the electronic device <NUM> (e.g., the display device <NUM>) based on the pen signal and perform the first operation corresponding to the identified position of the stylus pen <NUM>. For example, the electronic device <NUM> may perform a function corresponding to an icon displayed on the display device <NUM>. The electronic device <NUM> may display a drawing object on the display device <NUM> as the stylus pen <NUM> moves. The electronic device <NUM> may perform the function corresponding to the pressed state of the pen button, and the first operation is not limited to a specific one.

According to <FIG>, when no pen signal is detected (no in operation <NUM>), the electronic device <NUM> may receive information about the position of the stylus pen <NUM> in operation <NUM>. The electronic device <NUM> may receive at least one communication signal from the stylus pen <NUM> and identify information about the position of the stylus pen <NUM> included in each of the at least one communication signal received. The information about the position of the stylus pen <NUM> may include, for example, and without limitation, at least one of sensing data (e.g., raw data), coordinates, displacement, etc. of the stylus pen <NUM>. The electronic device <NUM> may identify the time-series positions of the stylus pen <NUM>. In operation <NUM>, the electronic device <NUM> may identify a gesture based on at least part of the information about the position of the stylus pen <NUM>. Upon detecting a pen signal, the electronic device <NUM> may also receive the information about the position of the stylus pen <NUM> in which case the signal may be disregarded. In operation <NUM>, the electronic device <NUM> may perform a second operation corresponding to the identified gesture. The second operation may be set to differ from the first operation. The electronic device <NUM> may map an operation corresponding to a gesture and identify and perform the mapped operation.

According to <FIG>, the electronic device <NUM> may identify whether an operation repetition event is detected in operation <NUM>. The electronic device <NUM> may identify whether the operation repetition event is detected based on, e.g., the information included in the communication signal from the stylus pen <NUM>. For example, when the position of the stylus pen <NUM> is fixed, with the button of the stylus pen <NUM> remaining pressed, the electronic device <NUM> may identify that the operation repetition event has been detected. It will be appreciated by one of ordinary skill in the art that the operation repetition event is not limited to a particular kind or type. Upon identifying that the operation repetition event is detected (yes in operation <NUM>), the electronic device <NUM> may repeat the second operation in operation <NUM>. For example, the electronic device <NUM> may repeat the operation (e.g., the second operation) that was performed immediately before the operation repetition event is detected. For example, the framework (e.g., a manager) of the electronic device <NUM> may retransmit an event related to the determined gesture to an application. By receiving the event again, the application may perform the operation mapped to the event, thus repeating the operation. When detection of the operation repetition event is not identified (no in operation <NUM>), the electronic device <NUM> may refrain from repeating the second operation, thereby performing the second operation once.

<FIG> is a flowchart illustrating an example method for operating an electronic device.

In operation <NUM>, the electronic device <NUM> may identify a pressing of the button (e.g., the button <NUM>) of the stylus pen <NUM>. The electronic device <NUM> may receive a communication signal including information indicating the pressed state of the button of the stylus pen <NUM> from the stylus pen <NUM>. The electronic device <NUM> may, for example, identify the pressed state of the button based on a variation in the frequency of the output from the digitizer. In operation <NUM>, the electronic device <NUM> may receive information about the position of the stylus pen <NUM>. The electronic device <NUM> may, for example, receive a communication signal from the stylus pen <NUM>. The communication signal may include information (e.g., at least one of sensing information, coordinates, or displacement) about the position of the stylus pen <NUM>. In operation <NUM>, the electronic device <NUM> may identify whether a gesture is identified based on the position information. For example, the electronic device <NUM> may execute a detector (e.g., a swipe gesture detector or a circle gesture detector) for detecting a plurality of gestures. Detectors may include, for example, a determination algorithm executed by, e.g., the processor <NUM> and may output a specific gesture based on the received position information (e.g., coordinates). The electronic device <NUM> may identify whether a gesture is identified based on the result of information processing on the position for the detector. When no gesture is identified (no in operation <NUM>), the electronic device <NUM> may continuously receive position information from the stylus pen <NUM>. When the position information is accumulated in a time-series manner, the electronic device <NUM> may identify whether a gesture is detected based on at least part of the position information.

When a gesture is identified (yes in operation <NUM>), the electronic device <NUM> may identify whether a stop of the stylus pen <NUM> is detected based on the position information after the gesture is identified. Even after the gesture is identified, the electronic device <NUM> may keep on receiving position information and identify whether the stylus pen <NUM> stops based on the position information. For example, when the displacement of the stylus pen <NUM> is less than a threshold, the electronic device <NUM> may identify that the stylus pen <NUM> has stopped. Upon detecting a stop of the stylus pen <NUM> (yes in operation <NUM>), the electronic device <NUM> may repeat the operation corresponding to the identified gestured until the button of the stylus pen <NUM> is released in operation <NUM>. For example, the electronic device <NUM> may receive a communication signal including information indicating a button release from the stylus pen <NUM> and, until before the communication signal is received, repeat the operation corresponding to the gesture. The button release may be merely an example for stopping the repetition and how to stop the repetition is not limited thereto. For example, the electronic device <NUM> may receive position information from the stylus pen <NUM> and, based thereupon, identify that the stylus pen <NUM> resumes moving. The electronic device <NUM> may be configured to stop repeating the operation corresponding to the gesture using the resuming as a trigger, but an event for stopping the repetition is not limited thereto. When no stop of the stylus pen <NUM> is detected (no in operation <NUM>), the electronic device <NUM> may perform the operation corresponding to the identified gesture once (or a designated number of times) in operation <NUM>. When no stop of the stylus pen <NUM> is detected, the electronic device <NUM> may refrain from performing the operation corresponding to the gesture. Upon identifying that the button of the stylus pen <NUM> is released, the electronic device <NUM> may perform the operation corresponding to the gesture.

The electronic device <NUM> may identify a pressing of the button of the stylus pen <NUM> in operation <NUM>. The electronic device <NUM> may receive a communication signal including information indicating the button pressing from the stylus pen <NUM>. In operation <NUM>, the electronic device <NUM> may receive information about the position of the stylus pen <NUM>. In operation <NUM>, the electronic device <NUM> may identify whether the stylus pen <NUM> stops. For example, when the displacement of the stylus pen <NUM> is less than a threshold based on the position information about the stylus pen <NUM>, the electronic device <NUM> may identify that the stylus pen <NUM> has stopped. When no stop of the stylus pen <NUM> is identified (no in operation <NUM>), the electronic device <NUM> may continuously receive the position information about the stylus pen <NUM>.

Upon identifying that the stylus pen <NUM> stops (yes in operation <NUM>), the electronic device <NUM> may identify whether a gesture is identified based on the position information in operation <NUM>. When no gesture is identified (no in operation <NUM>), the electronic device <NUM> may continuously receive the position information about the stylus pen <NUM>. When a gesture is identified (yes in operation <NUM>), the electronic device <NUM> may repeat the operation corresponding to the identified gesture in operation <NUM>. In operation <NUM>, the electronic device <NUM> may identify whether the button of the stylus pen <NUM> is released. The electronic device <NUM> may identify whether the button of the stylus pen <NUM> is released based, for example, on whether a communication signal received from the stylus pen <NUM> includes information indicating that the button is released. When the button of the stylus pen <NUM> is not identified to be released (no in operation <NUM>), the electronic device <NUM> may repeat the operation corresponding to the identified gesture. When the button of the stylus pen <NUM> is identified to be released (yes in operation <NUM>), the electronic device <NUM> may stop repeating the operation in operation <NUM>.

<FIG> is a diagram illustrating an example of repeating an execution of an operation according to an embodiment.

According to an embodiment, the electronic device <NUM> may execute a music play application and display a first execution screen <NUM> of the music play application. The first execution screen <NUM> may, for example, include a visual element for controlling the playback of music, a progress bar, and information about the current sound volume. For example, the current sound volume on the first execution screen <NUM> may be displayed as <NUM>, and the electronic device <NUM> may output music in volume <NUM>. The user may input a left-to-right gesture <NUM>, with the button <NUM> of the stylus pen <NUM> pressed. When the button <NUM> of the stylus pen <NUM> starts to be pressed, the stylus pen <NUM> may transmit communication signals including position information to the electronic device <NUM>. The electronic device <NUM> may identify the gesture (e.g., the left-to-right swipe gesture) based on the position information included in the received communication signals. The electronic device <NUM> may turn the volume up one notch, which is an operation mapped to the left-to-right swipe gesture on the music play application. The electronic device <NUM> may turn the volume up one notch and display a second screen <NUM> showing that the current volume is level <NUM>. The user may stop moving the stylus pen <NUM> and keep the button <NUM> pressed. The stylus pen <NUM> may continuously transmit information about the motion state to the electronic device <NUM>. The electronic device <NUM> may identify that the stylus pen <NUM> has stopped moving, with the button <NUM> pressed and, based thereupon, repeat the operation corresponding to the gesture. Thus, the electronic device <NUM> may turn the volume up one notch and display a third screen <NUM> showing that the current volume is level <NUM>. Although not shown, the electronic device <NUM> may sequentially and continuously turn the volume up. When the user releases the button <NUM>, the stylus pen <NUM> may transmit a communication signal including information indicating that the button is released to the electronic device <NUM>. The electronic device <NUM> may stop repeating the operation based on the identification of the button release.

According to an embodiment, the electronic device <NUM> may execute a camera application and display a first execution screen <NUM> of the camera application. The first execution screen <NUM> may include, e.g., a preview image obtained by a camera and a visual element for controlling capturing and/or camera settings. The user may input a circle gesture <NUM> of circling clockwise, with the button <NUM> of the stylus pen <NUM> pressed. When the button <NUM> of the stylus pen <NUM> starts to be pressed, the stylus pen <NUM> may transmit communication signals including position information to the electronic device <NUM>. The electronic device <NUM> may identify the gesture (e.g., the clockwise circle gesture) based on the position information included in the received communication signals. The electronic device <NUM> may perform a zoom-in operation that is mapped to the clockwise circle gesture and display a second screen <NUM> as a result of the zoom-in operation. The user may stop moving the stylus pen <NUM> and keep the button <NUM> pressed. The stylus pen <NUM> may continuously transmit information about the motion state to the electronic device <NUM>. The electronic device <NUM> may identify that the stylus pen <NUM> has stopped moving, with the button <NUM> pressed and, based thereupon, repeat the operation corresponding to the gesture. Thus, the electronic device <NUM> may display a third screen <NUM> which is a result of the additional zoom-in operation. Although not shown, the electronic device <NUM> may sequentially and repeatedly perform the zoom-in operation. When the user releases the button <NUM>, the stylus pen <NUM> may transmit a communication signal including information indicating that the button is released to the electronic device <NUM>. The electronic device <NUM> may stop repeating the operation based on the identification of the button release.

According to an embodiment, the electronic device <NUM> may execute a Gallery application and display a first execution screen <NUM> of the Gallery application. The first execution screen <NUM> may be, e.g., a first image stored on the Gallery application. The user may input a left-to-right swipe gesture <NUM>, with the button <NUM> of the stylus pen <NUM> pressed. When the button <NUM> of the stylus pen <NUM> starts to be pressed, the stylus pen <NUM> may transmit communication signals including position information to the electronic device <NUM>. The electronic device <NUM> may identify the gesture (e.g., the left-to-right swipe gesture) based on the position information included in the received communication signals. The electronic device <NUM> may perform an image switching operation that is mapped to the left-to-right swipe gesture on the Gallery application. Based on the image switching operation, the electronic device <NUM> may display both a portion 921a of the first image and a portion 922a of a second image next in order to the first image and, although not shown, may then display the whole second image. The user may stop moving the stylus pen <NUM> and keep the button <NUM> pressed. The stylus pen <NUM> may continuously transmit information about the motion state to the electronic device <NUM>. The electronic device <NUM> may identify that the stylus pen <NUM> has stopped moving, with the button <NUM> pressed and, based thereupon, repeat the operation corresponding to the gesture. Thus, the electronic device <NUM> may perform an additional image switching operation. Thus, the electronic device <NUM> may display both a portion 922b of the second image and a portion 923a of a third image next in order to the second image and, although not shown, may then display the whole third image. Although not shown, the electronic device <NUM> may sequentially and repeatedly perform the image switching operation. When the user releases the button <NUM>, the stylus pen <NUM> may transmit a communication signal including information indicating that the button is released to the electronic device <NUM>. The electronic device <NUM> may stop repeating the operation based on the identification of the button release.

<FIG> is a diagram illustrating an example of transmission/reception of a communication signal between an electronic device and a stylus pen according to an embodiment.

According to an embodiment, the stylus pen <NUM> may identify a button press in operation <NUM>. The stylus pen <NUM> may transmit a communication signal including information indicating the button press to the electronic device <NUM> in operation <NUM>. The electronic device <NUM> may start gesture recognition based on identifying the information indicating the button press in operation <NUM>. The stylus pen <NUM> may obtain motion data in operation <NUM>. Although <FIG> illustrates an example in which the stylus pen <NUM> obtains and transmits information about the displacement of the stylus pen <NUM> as the motion information, this is merely an example. For example, the stylus pen <NUM> may obtain information about the coordinates of the stylus pen <NUM> as the position information. The stylus pen <NUM> may identify the above-described coordinates or displacement using raw data from, e.g., a sensor (e.g., at least one of an accelerometer, gyro sensor, or geomagnetic sensor). The stylus pen <NUM> may directly transmit the raw data to the electronic device <NUM>. For example, the stylus pen <NUM> may transmit a displacement of (Xm<NUM>, Ym<NUM>) in operation <NUM>, a displacement of (Xm<NUM>, Ym<NUM>) in operation <NUM>, a displacement of (Xmn, Ymn) in operation <NUM>, and a displacement of (Xmn+<NUM>, Ymn+<NUM>) in operation <NUM>. In operation <NUM>, the electronic device <NUM> may be recognizing a gesture. For example, the electronic device <NUM> may input the coordinates identified by the displacements to determination algorithms (e.g., gesture detectors) individually corresponding to a plurality of gestures and may identify whether an algorithm indicating gesture detection is among the determination algorithms. In operation <NUM>, the electronic device <NUM> may complete gesture recognition and transfer a command for performing the operation mapped to the gesture to an application (e.g., a designated application or an application running in the foreground).

According to an embodiment, before the button is released, the stylus pen <NUM> may transmit the displacement of (Xs<NUM>, Ys<NUM>) in operation <NUM>. Each component of the displacement of (Xs<NUM>, Ys<NUM>) may be substantially <NUM>. The electronic device <NUM> may identify that the size (e.g., the size of each component and/or the absolute value of the displacement vector) of the displacement (Xs<NUM>, Ys<NUM>) is smaller than a threshold size and treat the size of the displacement of (Xs<NUM>, Ys<NUM>) as <NUM> and identify this as a stopped state. In operation <NUM>, the electronic device <NUM> may start motion stop recognition after the gesture recognition is complete. In operation <NUM>, the electronic device <NUM> may be amid motion stop recognition. For example, the electronic device <NUM> may input the received coordinates or displacement to the algorithm for determining whether it stops and may monitor whether information indicating a stop is output. In operations <NUM>, <NUM>, <NUM>, and <NUM>, the stylus pen <NUM> may transmit the displacement of (Xsn, Ysn), the displacement of (Xsn+<NUM>, Ysn+<NUM>), the displacement of (Xsn+<NUM>, Ysn+<NUM>), and the displacement of (Xsn+<NUM>, Ysn+<NUM>), respectively. The size of the displacement of (Xsn,Ysn), the displacement of (Xsn+<NUM>, Ysn+<NUM>), the displacement of (Xsn+<NUM>, Ysn+<NUM>), and the displacement of (Xsn+<NUM>, Ysn+<NUM>) may be smaller than a threshold size and, thus, it may be treated as <NUM> by the electronic device <NUM>. In operation <NUM>, the electronic device <NUM> may recognize the motion stop of the stylus pen <NUM> and start repeating the transfer of a command to the application. In operation <NUM>, the electronic device <NUM> may identify that the motion stop and button pressed state of the stylus pen <NUM> are maintained based on the received information and may repeat command transfer. In operation <NUM>, the stylus pen <NUM> may identify a button release and, in operation <NUM>, the stylus pen <NUM> may transmit a communication signal including information indicating the button release to the electronic device <NUM>. In operation <NUM>, the electronic device <NUM> may terminate the repeated transfer of a command to the application.

<FIG> is a flowchart illustrating an example method for operating an electronic device according to an embodiment.

According to an embodiment, the electronic device <NUM> may identify a pressing of the button of the stylus pen <NUM> in operation <NUM>. In operation <NUM>, the electronic device <NUM> may identify whether a pen signal is detected. The electronic device <NUM> may identify whether a pen signal is detected based, for example, on whether an EMR signal or ECR signal is received or whether the capacitance of the panel is varied. Upon identifying that a pen signal is detected (yes in operation <NUM>), the electronic device <NUM> may perform a first operation corresponding to the pen signal and/or button press in operation <NUM>. For example, the electronic device <NUM> may perform an operation corresponding to the button press based on the position of the stylus pen <NUM> identified by the digitizer (or panel). When no pen signal is detected (no in operation <NUM>), the electronic device <NUM> may receive a communication signal including information about the position of the stylus pen <NUM> in operation <NUM>. In operation <NUM>, the electronic device <NUM> may identify whether the stylus pen <NUM> stops. When the displacement of the stylus pen <NUM> is less than a threshold displacement based on the position information about the stylus pen <NUM>, the electronic device <NUM> may identify that the stylus pen <NUM> has stopped. When no stop of the stylus pen is identified (no in operation <NUM>), the electronic device <NUM> may identify whether the button of the stylus pen <NUM> is released in operation <NUM>. When no release of the button of the stylus pen <NUM> is identified (no in operation <NUM>), the electronic device <NUM> may again receive the position information about the stylus pen <NUM> in operation <NUM>. The electronic device <NUM> may identify whether the button is released based on the information included in the communication signal from the stylus pen <NUM>. Upon identifying that the button of the stylus pen <NUM> is released (yes in operation <NUM>), the electronic device <NUM> may perform a second operation corresponding to the identified gesture based on the position information.

According to an embodiment, when the stylus pen is identified to stop (yes in operation <NUM>), the electronic device <NUM> may perform a second operation corresponding to the identified gesture based on the position information in operation <NUM>. In operation <NUM>, the electronic device <NUM> may identify whether the button of the stylus pen <NUM> is released. When no button release is identified (no in operation <NUM>), the electronic device <NUM> may repeat the second operation in operation <NUM>. For example, based on the stylus pen stopping and the button remaining pressed, when the button is identified to be released (yes in operation <NUM>), the electronic device <NUM> may stop repeating the second operation in operation <NUM>.

According to an embodiment, the electronic device <NUM> may identify repeating an operation corresponding to a gesture in operation <NUM>. For example, the electronic device <NUM> may identify repeating the operation corresponding to the gesture based on identifying that the stopped state is maintained, with the button of the stylus pen <NUM> remaining pressed. The electronic device <NUM> may transfer a command for the operation corresponding to the gesture to an application (e.g., a designated application or an application running in the foreground).

According to an embodiment, the electronic device <NUM> may identify a repetition cycle set corresponding to the operation and/or application in operation <NUM>. In operation <NUM>, the electronic device <NUM> may repeat the operation corresponding to the gesture in the identified repetition cycle. For example, the electronic device <NUM> may identify the repetition cycle set corresponding to the operation to be repeated. For example, the electronic device <NUM> may identify a repetition cycle set per application. The electronic device <NUM> may determine the repetition cycle based on a factor, as well as the operation and/or application. The kind of the factor is not limited to a specific one.

According to an embodiment, the electronic device <NUM> may identify repeating an operation corresponding to a gesture in operation <NUM>. According to an embodiment, the electronic device <NUM> may identify a repetition cycle based on additional information in operation <NUM>. For example, the electronic device <NUM> may identify the repetition cycle based on the input speed of the gesture. The electronic device <NUM> may identify the repetition cycle based on an additional user input (e.g., a voice input). The kind of the additional information is not limited to any specific type. In operation <NUM>, the electronic device <NUM> may repeat the operation corresponding to the gesture in the identified repetition cycle.

<FIG> is a flowchart illustrating an example method for operating an electronic device according to an embodiment. The embodiment related to <FIG> is described with reference to <FIG> is a diagram illustrating an example detector according to an embodiment.

According to an embodiment, the electronic device <NUM> may identify a gesture initiation event in operation <NUM>. In operation <NUM>, the electronic device <NUM> may receive information about the position of the stylus pen. In operation <NUM>, the electronic device <NUM> may identify a candidate gesture based on at least part of the received pen position information. For example, the electronic device <NUM> may receive the coordinates from the stylus pen <NUM> via an antenna <NUM> and communication module <NUM> as shown in <FIG>. The electronic device <NUM> may provide the received coordinates to a swipe gesture detector <NUM> and a circle gesture detector <NUM>. When the electronic device <NUM> receives raw data or displacement, the electronic device <NUM> may convert the same into coordinates and provide the coordinates to the detectors <NUM> and <NUM>. Detectors may be a determination algorithm executed by, e.g., the processor <NUM> and may output a specific gesture based on the received coordinates. For example, the swipe gesture detector <NUM> may output at least one of a swipe left gesture <NUM>, a swipe right gesture <NUM>, a swipe up gesture <NUM>, or a swipe down gesture <NUM> as a candidate gesture based on the received coordinates. When there is no gesture meeting a condition, the swipe gesture detector <NUM> may output no gesture. The circle gesture detector <NUM> may output at least one of a clockwise gesture <NUM> or counterclockwise gesture <NUM> as a candidate gesture based on the received coordinates. When there is no gesture meeting a condition, the circle gesture detector <NUM> may output no gesture. A detection algorithm for the swipe gesture detector <NUM> and the circle gesture detector <NUM> is described by way of example below. The swipe gesture detector <NUM> and the circle gesture detector <NUM> may be executed substantially simultaneously but, according to an implementation, they may be performed sequentially. Both the detectors <NUM> and <NUM> may be executed, or only the detector corresponding to gestures supported by the application running in the foreground may be executed. It will be appreciated by one of ordinary skill in the art that the kind and number of the detectors <NUM> and <NUM> are merely an example and are not limited thereto.

According to an embodiment, the electronic device <NUM> may identify whether a gesture termination event is detected in operation <NUM>. Before a gesture termination event is detected (no in operation <NUM>), the electronic device <NUM> may maintain the candidate gesture identification operation. For example, the electronic device <NUM> may provide new coordinates received to each of the detectors <NUM> and <NUM> while continuing to execute the detectors <NUM> and <NUM>. When a termination event is detected (yes in operation <NUM>), the electronic device <NUM> may select a gesture from among candidate gestures in operation <NUM>. For example, the processor <NUM> may execute a gesture determiner <NUM> as shown in <FIG>. The gesture determiner <NUM> may refer, for example, to an algorithm for selecting any one from among at least one candidate gesture. The electronic device <NUM> may perform an operation corresponding to the selected gesture in operation <NUM>. For example, the electronic device <NUM> may transfer the gesture or a command for performing a function mapped to the gesture to any one of applications <NUM>, <NUM>, <NUM>, and <NUM> included in a set <NUM> of loaded applications. A preset application or an application running in the foreground may be selected as an application to receive the gesture or the command for performing the function mapped to the gesture. A different function may be mapped to the gesture per application. Table <NUM> shows example mapping of per-application functions to gestures according to an embodiment.

Referring to Table <NUM>, the electronic device <NUM> may map a different function to the gesture for the state of (e.g., the state before or while capturing) one application (e.g., a camera application). For a specific application (e.g., a music application), no function may be mapped to a specific gesture (e.g., swipe up/down gesture).

According to an embodiment, the electronic device <NUM> may identify the coordinates of the position of the stylus pen <NUM> in operation <NUM>. In operation <NUM>, the electronic device <NUM> may perform scoring using at least one parameter based on the coordinates of the position of the stylus pen <NUM>. For example, the electronic device <NUM> may identify, as parameters, the direction of displacement between adjacent coordinates, the size of the displacement, the direction and size of any coordinates from the start point among all the coordinates and may perform scoring using the parameters. A different parameter and scoring scheme may be set per detector. In operation <NUM>, the electronic device <NUM> may identify whether the result of scoring meets a designated condition. When the designated condition is met (yes in operation <NUM>), the electronic device <NUM> may identify it as a candidate gesture in operation <NUM>. Unless the designated condition is met (no in operation <NUM>), the electronic device <NUM> may identify whether a gesture termination event is detected in operation <NUM>. For example, the electronic device <NUM> may identify a corresponding gesture and continue to perform computation on subsequent coordinates continuously entered. The electronic device <NUM> may store the identified gesture and update the stored gesture with another gesture based on the subsequent coordinates continuously entered. In other words, the electronic device <NUM> may perform scoring until the designated condition for the specific gesture fails to be met and, when the result of additional scoring fails to meet the designated condition, the electronic device <NUM> may determine that the gesture has not been detected. As described below, the electronic device <NUM> may manage the gesture as not applied (e.g., the non-applied state <NUM> of <FIG>). The electronic device <NUM> may identified that the previously updated gesture is a candidate gesture.

According to an embodiment, in operation <NUM>, the electronic device <NUM> may identify whether a gesture termination event is detected. When no gesture termination event is detected (no in operation <NUM>), the electronic device <NUM> may return to operation <NUM> and identify the new coordinates of the stylus pen <NUM>. The electronic device <NUM> may identify parameters for the new coordinates and perform scoring and, based on the result of scoring, the electronic device <NUM> may again determine whether to classify as a candidate gesture. When a gesture termination event is detected (yes in operation <NUM>), the electronic device <NUM> may select the candidate gesture as the gesture in operation <NUM>. As the coordinates are accumulated as described above, the specific gesture may be classified as a candidate gesture and be then managed as not detected by additional coordinates.

<FIG> is a state diagram illustrating an example switch between states configured to determine candidate gestures according to an embodiment.

According to an embodiment, the electronic device <NUM> may configure an idle state <NUM>, an interesting state <NUM>, a satisfied state <NUM>, and a non-applied (N/A) state <NUM> corresponding to a specific gesture. The idle state <NUM> may, for example, be a standby state to receive coordinates when a pairing with the stylus pen <NUM> is created. Upon receiving the coordinates of the position of the stylus pen <NUM>, the electronic device <NUM> may enter the interesting state <NUM>. In the interesting state <NUM>, the electronic device <NUM> may, for example, perform scoring using parameters identified from the coordinates. When the result of scoring meets a designated condition, the electronic device <NUM> may identify a gesture corresponding to the satisfied state <NUM> and keep on performing computation on subsequent coordinates continuously entered. In other words, the electronic device <NUM> may perform scoring until the designated condition fails to be met. Meanwhile, unless the result of scoring meets the designated condition in the interesting state <NUM>, the electronic device <NUM> may classify the gesture as the non-applied state <NUM>. Further, when the result of scoring is rendered to fail to meet the designated condition by additional coordinates in the satisfied state <NUM>, the electronic device <NUM> may store the last gesture meeting the scoring as a candidate gesture (last gesture) and classify the gesture as the non-applied state <NUM>. After entering the non-applied state <NUM> and when coordinates are received again, the electronic device <NUM> may enter the interesting state <NUM>. The electronic device <NUM> may perform scoring using the parameter identified from the subsequent coordinates continuously entered and, when the designated condition is met, enter the satisfied state <NUM> for the gesture. After entering the satisfied state <NUM>, the electronic device <NUM> may continuously perform scoring until the designated condition fails to be met and, when the condition fails to be met, store the last gesture meeting the scoring as a candidate gesture (ongoing gesture). In this case, the electronic device <NUM> may compare the lead distances of the stored gesture (last gesture) and the ongoing gesture and store the gesture with the longer lead distance as a candidate gesture. Comparison between the parameters of the ongoing gesture and the last gesture may be referred to as comparison between the parameters of candidate gestures.

According to an embodiment, the electronic device <NUM> may select any one of the detected candidate gestures upon detecting a termination event, rather than exchanging and storing, in real-time, the candidate gestures. For example, the electronic device <NUM> may identify at least one gesture detected until before a termination event (e.g., a button release) is detected and, upon detecting a termination event, the electronic device <NUM> may select any one of at least one gesture.

It is to be understood that if an element (e.g., a first element) is referred to, with or without the term "operatively" or "communicatively", as "coupled with," "coupled to," "connected with," or "connected to" another element (e.g., a second element), the element may be coupled with the other element directly (e.g., wiredly), wirelessly, or via a third element.

Various embodiments as set forth herein may be implemented as software (e.g., the program) including one or more instructions that are stored in a storage medium (e.g., internal memory or external memory) that is readable by a machine (e.g., a master device or a device performing tasks). For example, a processor of the machine (e.g., a master device or a device performing tasks) may invoke at least one of the one or more instructions stored in the storage medium, and execute it, with or without using one or more other components under the control of the processor. Wherein, the "non-transitory" storage medium is a tangible device, and may not include a signal (e.g., an electromagnetic wave), but this term does not differentiate between where data is semi-permanently stored in the storage medium and where the data is temporarily stored in the storage medium.

As is apparent from the foregoing description, according to various embodiments, there may be provided an electronic device that may identify a gesture with a stylus pen, based on information included in a communication signal received from the stylus pen and repeat an operation corresponding to the identified gesture and a method for operating the electronic device.

Claim 1:
An electronic device (<NUM>), comprising:
a communication module (<NUM>) comprising communication circuitry;
a processor (<NUM>) electrically connected with the communication module; and
a memory (<NUM>) electrically connected with the processor, wherein the memory stores instructions configured to, when executed by the processor, cause the processor to control the electronic device to:
receive at least one first communication signal from a stylus pen (<NUM>) through the communication module;
identify a gesture initiation event based on information included in the first communication signal (<NUM>);
apply a transmission signal to a loop coil in the electronic device; and
identify a pen signal as being detected when the magnitude of a signal received from the stylus pen in resonance to the transmission signal is greater than or equal to a threshold magnitude, and identify a pen signal as not being detected otherwise (<NUM>),
if the pen signal is detected, then the instructions, when executed by the processor, cause the processor to execute a first operation corresponding to the pen signal (<NUM>),
if the pen signal is not detected, then the instructions, when executed by the processor, cause the processor to:
receive at least one second communication signal from the stylus pen through the communication module (<NUM>);
based on information about a position of the stylus pen included in the at least one second communication signal, identify a gesture (<NUM>); and
perform a second operation corresponding to the identified gesture, the second operation being different to the first operation (<NUM>),
the instructions further causing the processor to control the electronic device to, based on detecting a repetition event for the identified second operation based on at least one third communication signal received from the stylus pen through the communication module, repeat an execution of the identified second operation (<NUM>, <NUM>),
wherein the instructions, when executed by the processor (<NUM>), cause the processor to:
identify that the information about the position of the stylus pen (<NUM>) included in the at least one third communication signal indicates a stop state of the stylus pen; and
detect the stop state of the stylus pen as the repetition event for the identified second operation based on identifying a holding of the pressing of a button of the stylus pen while identifying the stop state of the stylus pen (<NUM>).