1. Technical Field
Embodiments of the present disclosure relate to remote control technology, and particularly to a handheld device and method for controlling an electronic device remotely using the handheld device.
2. Description of Related Art
Handheld device (e.g., smart phones) have been used as remote-control units to control electronic devices, such as televisions and digital video disk (DVD) players. However, a target device to be controlled must be selected manually by a user from a target device list in the handheld device. Then, the handheld device controls the selected target device to perform functions in response to receiving user operations on a keypad (including physical keys or software buttons) of the handheld device. Therefore, an efficient method for controlling electronic devices remotely is desired.
All of the processes described below may be embodied in, and fully automated via, functional code modules executed by one or more general purpose electronic devices or processors. The code modules may be stored in any type of non-transitory computer-readable medium or other storage device. Some or all of the methods may alternatively be embodied in specialized hardware. Depending on the embodiment, the non-transitory computer-readable medium may be a hard disk drive, a compact disc, a digital video disc, a tape drive or other suitable storage medium.
The display device 21 may be a liquid crystal display (LCD), a touch sensitive screen, or other display device. The electronic compass chip 22 is used to detect an indicating direction of the handheld device 20 (i.e., a direction in which the handheld device 20 is pointing). For example, as shown in
The acceleration sensor 23 is used to detect movement data of the handheld device 20 by obtaining acceleration values of the handheld device 20 in an X-axis, a Y-axis, and a Z-axis, and determining a gradient degree in the X-axis, the Y-axis, and the Z-axis according to the acceleration values, to obtain the movement data of the handheld device 20. For example, a first example of a horizontal movement of the handheld device 20 is shown in
The remote control system 25 is used to determine an electronic device 10 to be controlled by the handheld device 20 according to the indicating direction of the handheld device 20 detected by the electronic compass chip 22, and controls the determined electronic device 10 to perform functions according to the movement data of the handheld device 20 detected by the acceleration sensor 23. In one embodiment, the remote control system 25 may include computerized instructions in the form of one or more programs that are executed by the at least one processor 26 and stored in the storage device 24 (or memory). A detailed description of the remote control system 25 will be given in the following paragraphs.
Before describing the flowchart of
For example, the identifier of the electronic device 10 may be a globally unique identifier (GUID) of the electronic device 10, or may be set by the user manually. In one embodiment, the configuration documents are set when the handheld device 20 is in a horizontal state (e.g., as shown in
An example of setting the display directions of the electronic devices 10 at the specified location is as follows. The user points the handheld device 20 towards the electronic device 10, the setting module 201 records a current indicating direction of the handheld device 20 as detected by the electronic compass chip 22, and determines that the display direction of the electronic device 10 is the current indicating direction of the handheld device 20. For example, if the current indicating direction of the handheld device 20 is forty-five degrees, the display direction of the electronic device 10 is determined to be forty-five degrees.
The above-mentioned process is repeated until the display directions of all the electronic devices 10 within the specified location are set. The setting module 201 stores the identifier and the display direction of each electronic device 10 in the configuration document of the specified location, and further stores all the configuration documents into the storage device 24.
In step S1, the first searching module 202 searches for one or more electronic devices 10 at a current location when the remote control system 25 is selected by the user.
In step S2, the second searching module 203 obtains configuration documents of different locations from the storage device 24, and determines a configuration document which has the most quantity or ratio of the searched electronic devices 10 (i.e., the electronic devices found in step S1). The determined configuration document is regarded as the configuration document of the current location. Thus, there is no need to search all the configuration documents and then select one configuration document for the current location manually by the user because the second searching module 203 automatically determines the configuration document which is appropriate to the current location. In other embodiments, the configuration document of the current location also may be selected manually from the storage device 24.
For example, the storage device 24 may store two configuration documents of two different locations, such as “D1” and “D2”. Suppose that the configuration document “D1” stores identifiers and display directions of three electronic devices, such as “e1”, “e2”, and “e3”, and the configuration document “D2” stores identifiers and display directions of two electronic devices, such as “e3”, and “e4”, and the current location is determined to include the electronic devices “e1”, “e2”, and “e3”. Even if the electronic device “e1” is shut down, the first searching module 202 still finds two electronic devices “e2” and “e3” at the current location. The second searching module 203 will determine that it is the configuration document “D1” which includes the most in quantity (two) or in ratio (2/3) of the searched electronic devices “e2” and “e3”.
In step S3, the detecting module 204 obtains an indicating direction of the handheld device 20 detected by the electronic compass chip 22 when the handheld device 20 is pointed to one of the electronic devices 10 at the current location.
In step S4, the comparing module 205 compares the indicating direction of the handheld device 20 with a display direction of each electronic device recorded in the determined configuration document (e.g., “D1”), and obtains a matched electronic device corresponding to the indicating direction of the handheld device 20. The matched electronic device is a target device to be controlled by the handheld device 20. An example of obtaining the matched electronic device is as follows.
First, the comparing module 205 determines a deflection range of the indicating direction of the handheld device 20 by increasing the indicating direction of the handheld device 20 by a preset angle (e.g., 30°). For example, as shown in
Second, the comparing module 205 determines one particular electronic device recorded in the determined configuration document as the matched electronic device upon the condition that the display direction of the electronic device falls within the deflection range. For example, as shown in
If no matched electronic device has not been found, the comparing module 205 displays a prompt message on the display device 21, to ask the user to adjust the indicating direction of the handheld device 20. For example, as shown in
If more than two matched electronic devices have been found, the comparing module 205 selects the electronic device whose display direction is closest to the indicating direction of the handheld device 20 as the matched electronic device.
In step S5, the controlling module 206 detects movement data of the handheld device 20 using the acceleration sensor 23, and controls the matched electronic device to perform functions corresponding to the movement data of the handheld device 20. In one embodiment, a control operation is executed when the handheld device 20 is in the vertical state, or a control operation is not executed when the handheld device 20 is in the horizontal state. A detailed description is as follows.
First, the controlling module 206 obtains a state (e.g., a horizontal state or a vertical state) of the handheld device 20 according to the included angle between the handheld device 20 and the horizontal plane. If the handheld device 20 is in the horizontal state, the procedure returns to step S4 to determine a next matched electronic device. If the handheld device 20 is in the vertical state, the controlling module 206 obtains a first mapping document from the storage device 24, the first mapping document stores a one-to-one mapping relation between the movement data of the handheld device 20 and the corresponding function executed by the matched electronic device.
Second, the controlling module 206 determines a function corresponding to the movement data of the handheld device 20, and controls the matched electronic device to perform the corresponding function. For example, if the handheld device 20 moves left in the vertical state (as shown in
In a second embodiment, the control operations are always executed whether the handheld device 20 is in the horizontal state or the vertical state.
In a third embodiment, step S5 may be executed as follows. The controlling module 206 detects a touch operation on the display device 21 of the handheld device 20, and controls the matching electronic device to perform functions corresponding to the touch operation. The touch operation may be a touch event detected on a keypad (including physical keys or software buttons) of the display device 12. A detailed description is as follows.
First, the controlling module 206 obtains a second mapping document from the storage device 24, the second mapping document stores a one-to-one mapping relation between any touch operation on the handheld device 20 and a corresponding function executed by the matched electronic device.
Second, the controlling module 206 determines a function corresponding to the touch operation on the handheld device 20, and controls the matched electronic device to perform the corresponding function. For example, if a touch operation on a left key on the display device 21 of the handheld device 20 is detected, the controlling module 206 controls the matched electronic device to play the previous song. If a touch operation on a right key on the display device 21 of the handheld device 20 is detected, the controlling module 206 controls the matched electronic device to play the next song in a playlist.
It should be emphasized that the above-described embodiments of the present disclosure, particularly, any embodiments, are merely possible examples of implementations, merely set forth for a clear understanding of the principles of the disclosure. Many variations and modifications may be made to the above-described embodiment(s) of the disclosure without departing substantially from the spirit and principles of the disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and the present disclosure and protected by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
100144181 | Dec 2011 | TW | national |