Embodiment
Below in conjunction with drawings and Examples, the present invention is described in detail.
Consult Fig. 1, Fig. 1 is that the present invention utilizes terminal to carry out the process flow diagram of method first embodiment of the wireless switching of lantern slide.The embodiment of the present invention comprises the steps:
Step S1, sets up and is connected with the bluetooth between lantern slide playback equipment.
Such as, mobile communication terminal and lantern slide playback equipment all have Bluetooth function, terminal mentioned by the present invention is in full for mobile phone, certainly mobile phone is not limited to, can be that any terminal with Bluetooth function comprises panel computer etc., lantern slide playback equipment is for computer in addition, is certainly also not limited to computer.
Computer and mobile phone are set up blue teeth wireless and are connected, and mobile phone is as main equipment, and computer is as from equipment.Before needs carry out lantern slide control, the bluetooth module of mobile phone carries out the inquiry of periphery bluetooth equipment, initiates connection request after finding this computer.The bluetooth module of computer waits for establishment of connection, and receives connection request, sets up bluetooth be connected with the bluetooth module of mobile phone.
Before carrying out above-mentioned bluetooth connection, first, the bluetooth module of computer needs to complete optimum configurations in advance, this optimum configurations comprises and arranges sweep parameter, arranges the need of carrying out verifying, arranging paging time-out etc., after setting up above-mentioned each parameter, the bluetooth module of computer such as just to enter at the state to be connected.Then, the bluetooth module of mobile phone is selected to enter slide demonstration pattern (namely entering in the application controlling lantern slide switching).The bluetooth module of such mobile phone carries out inquiring about and matching process, obtains the address of the bluetooth module of computer, and initiates connection request according to the address of the bluetooth module inquiring about the computer obtained.After bluetooth connection establishment, just can carry out the transmitting-receiving of data.
Step S2, is setting up the size and Orientation obtaining terminal acceleration after bluetooth connects.
Such as, embedded in mobile phone has action sensing module, and action sensing module is acceleration transducer.The acceleration of this acceleration transducer Real-time Obtaining mobile phone, acceleration is vector, namely needs the size and Orientation obtaining acceleration.
This step is the seizure to user action, acceleration transducer can sense the acceleration change of mobile phone in three-dimensional all directions, three-dimensional comprises: X, Y and Z-direction, acceleration has positive and negative dividing, same in the coordinate system of acceleration transducer self, the acceleration contrary with these three directions is defined as negative acceleration.
When mobile phone up and down, left and right or front and back have an acceleration time, acceleration transducer will obtain its acceleration, and report the three-dimensional of current phone, namely the size of the acceleration in these three directions of X-axis, Y-axis and Z axis, also comprises the size of the acceleration of the negative direction of negative direction i.e. X-axis, Y-axis and Z axis certainly.This acceleration transducer can when mobile phone acceleration changes, the size and Orientation of real-time report three-dimensional acceleration, the motion state of current phone is calculated again according to the size and Orientation data of acceleration, thus catch the action of user, i.e. left and right whipping mobile phone, up and down whipping mobile phone or stir mobile phone etc.Certain hour is built in mobile phone configuration file, also can by the actual demand self-defining of user.
Step S3, judges whether the size of acceleration reaches first threshold.
Such as, this first threshold values can be built in the fixing numerical value of of mobile phone configuration file, and now, user cannot change this numerical value; This first threshold also can be kept at the value arranged voluntarily by user in mobile phone file system.If the value that user is arranged, then according to the position ID of this numerical value corresponding to file system, this fixed value read from file system, assignment is to the variable in internal memory.
Mobile phone is drawn whether in a certain direction by whipping by the change calculating the mobile phone acceleration in certain hour.As, when mobile phone left whipping time, will in left direction, namely the positive dirction of X-axis obtains acceleration, reach the first threshold values according to mobile phone in certain hour in the size of the acceleration of left direction, just can show that mobile phone is by left whipping.
Step S4, if the size of acceleration reaches first threshold, the direction according to acceleration converts switching command to, if the direction of acceleration is first direction, convert to page up switching command, if the direction of acceleration is second direction, convert downward one page switching command to.
Such as, after action sensing module captures user action, and judge that this user action is effective, namely the size of acceleration reaches first threshold, expresses user and is intended to the switching of lantern slide.
Now, need to convert this action to lantern slide switching command.Lantern slide mainly contains two kinds of switching modes: switch and the switching of downward one page to page up.
General, machine of swinging one's arm left, the direction of acceleration is defined as first direction, is converted to page up switching command, machine of swinging one's arm to the right, and the direction of acceleration is defined as second direction, is converted to downward one page switching command.Certainly, also the machine of swinging one's arm left can be converted to downward one page switching command, the machine of swinging one's arm is converted to page up switching command to the right.Definition rule looks user habit setting, and its principle, as above, is not described in detail herein.
Owing to only having two kinds of switching modes, therefore, represent to page up switching command with integer data 0, represent downward one page switching command with integer data 1.Certainly, its representation can be various, herein for 0 and 1.
In this step, action is converted to after page up or downward one page switching command (0 or 1), this switching command is sent to bluetooth module.
Step S5, will be encoded into blue-teeth data to page up switching command or downward one page switching command.
Such as, bluetooth module receives after page up switching command or downward one page switching command (0 or 1), this switching command is encoded to the data layout of Bluetooth transmission, is namely encoded to blue-teeth data.
Step S6, is connected by bluetooth and sends blue-teeth data to lantern slide playback equipment.
Such as, by be encoded into blue-teeth data to page up switching command or downwards one page switching command to be connected by bluetooth and be sent to lantern slide playback equipment.
Step S7, lantern slide playback equipment receives the blue-teeth data of the switching lantern slide of self terminal.
Such as, lantern slide playback equipment, refers generally to computer, set up after bluetooth is connected with terminal, receive the blue-teeth data of self terminal, this blue-teeth data specially refers to the instruction for switching lantern slide, namely by the blue-teeth data of encoding to page up switching command or downward one page switching command.Because only the blue-teeth data of this type is effective for purposes of the invention.
Step S8, decoding blue-teeth data, obtains to page up switching command or downward one page switching command.
Such as, decode by the blue-teeth data of encoding to page up switching command or downward one page switching command, be reduced into page up switching command or downward one page switching command, be namely reduced into simple machine code (0 or 1).
Step S9, will become to page up switching command or downward one page switching command corresponding conversion and trigger keyboard key assignments or the keyboard of one page triggering downwards key assignments to page up.
Such as, actual trigger slides will be corresponded to page up switching command and trigger keyboard key assignments to page up, and downward one page switching command be corresponded to the downward one page of actual trigger slides and trigger keyboard key assignments.If a left side is got rid of and represented to page up and switch, convert switching command that is 0 to, it is P that lantern slide triggers keyboard key assignments to page up, and in real work, by 0 corresponding P, the effect triggering 0 is identical with the effect triggering P.
Step S10, according to triggering keyboard key assignments or the keyboard of one page triggering downwards key assignments switching lantern slide to page up.
Such as, the keyboard key assignments that trigging control lantern slide switches, and after the application of lantern slide receives keyboard key assignments, be pressed the same with actual keyboard, thus the application of control lantern slide switches.
At this, continuously to the left or to the right, continuous page turning can be realized, switch lantern slide, identical to other direction whipping mobile phone principle, repeat no longer one by one herein.
The embodiment of the present invention, by the size and Orientation of the acceleration of inductive terminations, when acceleration magnitude reaches first threshold, according to the direction of acceleration this action is converted into lantern slide to page up switching command or one page switching command downwards, and by this instruction of Bluetooth transmission, finally receive this instruction by lantern slide playback equipment, and received by receiving end and this instruction of decoding, finally this instruction is corresponded to actual keyboard key assignments, realize the switching of lantern slide to page up or downward one page, hardware can not be increased, save cost, and raising convenience, strengthen Consumer's Experience simultaneously.
Consult Fig. 2, Fig. 2 is that the present invention utilizes terminal to carry out the process flow diagram of method second embodiment of the wireless switching of lantern slide.Comprise the steps:
Step S11, sets up and is connected with the bluetooth between lantern slide playback equipment.
Computer and mobile phone are set up blue teeth wireless and are connected.When needs carry out before lantern slide control, the bluetooth module inquiry current Bluetooth network of mobile phone, and initiate connection request.The bluetooth module of computer waits for establishment of connection, and receives connection request, sets up bluetooth be connected with the bluetooth module of mobile phone.
As required, the bluetooth module of mobile phone carries out inquiring about and matching process, obtains the address of the bluetooth module of computer, and initiates connection request according to the address of the bluetooth module inquiring about the computer obtained.After bluetooth connection establishment, just can carry out the transmitting-receiving of data.
Step S12, is setting up the size and Orientation obtaining terminal acceleration after bluetooth connects.
Such as, embedded in mobile phone has action sensing module, and action sensing module is acceleration transducer.The acceleration of this acceleration transducer Real-time Obtaining mobile phone, acceleration is vector, namely needs the size and Orientation obtaining acceleration.
This acceleration transducer can when mobile phone acceleration changes, the size and Orientation of real-time report three-dimensional acceleration, the motion state of current phone is calculated again according to the size and Orientation data of acceleration, thus catch the action of user, i.e. left and right whipping mobile phone, up and down whipping mobile phone or stir mobile phone etc.Certain hour is built in mobile phone configuration file, also can by the actual demand self-defining of user.
Step S13, judges whether the size of acceleration reaches first threshold.
Such as, the change by calculating the mobile phone acceleration in certain hour draws mobile phone whether in a certain direction by whipping.As, when mobile phone left whipping time, will in left direction, namely the positive dirction of X-axis obtains acceleration, (this first threshold values can be built in the fixing numerical value of of mobile phone configuration file to reach the first threshold values according to mobile phone in certain hour in the size of the acceleration of left direction, now, user cannot change this numerical value; This first threshold also can be kept at the value arranged voluntarily by user in mobile phone file system), just can show that mobile phone is by left whipping.
Step S14, if the size of acceleration reaches first threshold, the direction according to acceleration converts switching command to, if the direction of acceleration is first direction, convert to page up switching command, if the direction of acceleration is second direction, convert downward one page switching command to.
Such as, after action sensing module captures user action, and judge that this user action is effective, namely the size of acceleration reaches first threshold, expresses user and is intended to the switching of lantern slide.
Now, need to convert this action to lantern slide switching command, namely to page up switching command or downward one page switching command.
General, machine of swinging one's arm left, the direction of acceleration is defined as first direction, is converted to page up switching command, machine of swinging one's arm to the right, and the direction of acceleration is defined as first direction, is converted to downward one page switching command.Certainly, the machine of swinging one's arm left that also can define is converted to downward one page switching command, and the machine of swinging one's arm is converted to page up switching command to the right.Definition rule looks user habit setting, and its principle, as above, is not described in detail herein.
Owing to only having two kinds of switching modes, therefore, represent to page up switching command with integer data 0, represent downward one page switching command with integer data 1.
In this step, action is converted to after page up or downward one page switching command (0 or 1), this switching command is sent to bluetooth module.
Step S15, will be encoded into blue-teeth data to page up switching command or downward one page switching command.
Such as, bluetooth module receives after page up switching command or downward one page switching command (0 or 1), this switching command is encoded to the data layout of Bluetooth transmission, is namely encoded to blue-teeth data.
Step S16, is connected by bluetooth and sends blue-teeth data to lantern slide playback equipment.
Such as, by be encoded into blue-teeth data to page up switching command or downwards one page switching command to be connected by bluetooth and be sent to lantern slide playback equipment.
The embodiment of the present invention, by responding to the size and Orientation of the acceleration of this terminal, when acceleration magnitude reaches first threshold, according to the direction of acceleration this action is converted into lantern slide to page up switching command or one page switching command downwards, and by this instruction of Bluetooth transmission, finally receive this instruction by lantern slide playback equipment, can not hardware be increased, save cost, and improve convenience.
Another preferred implementation of the embodiment of the present invention, in step s 11, mobile phone is as main equipment, and computer, as from equipment, when Bluetooth of mobile phone and computer bluetooth set up bluetooth, needs to carry out password coupling.When only having password the match is successful, Bluetooth of mobile phone is just allowed to be connected to computer bluetooth.Can effectively filter unspecified persons Bluetooth connection request, can effectively stop equipment such as artificially utilizing oneself mobile phone to hinder speaker to the operation of lantern slide.
Consult Fig. 3, Fig. 3 is that the present invention utilizes terminal to carry out the process flow diagram of method the 3rd embodiment of the wireless switching of lantern slide.Be with the difference of second embodiment of the invention:
Before step S11, comprising: step S17, make terminal enter slide demonstration pattern.
In addition, after step s 11, before step S12, comprising: step S18, detect and whether is currently connected available with the bluetooth between lantern slide playback equipment and whether enters slide demonstration pattern.
Such as, if the bluetooth between terminal with lantern slide playback equipment is connected available, and lantern slide playback equipment enters slide demonstration pattern, and namely condition is all set up, then carry out the step of the size and Orientation obtaining terminal acceleration, namely enter step S12; Otherwise do not carry out the step of the size and Orientation obtaining mobile communication terminal acceleration, namely do not enter step S12.Can saves energy, extend the working time of terminal.
Meanwhile, between step S13 and step S14, also comprise:
Whether step S19, detect bluetooth connection and can use.
Such as, if bluetooth connects available, then carry out the step converting switching command according to the direction of acceleration to, namely enter step S14; If bluetooth connects unavailable, then do not carry out the step converting switching command according to the direction of acceleration to, namely do not enter step S14.Here, bluetooth connects available finger, Bluetooth of mobile phone and computer bluetooth connect, and signal intensity is greater than Second Threshold, and (this Second Threshold sets as required, equally, being built in the fixed numbers in mobile phone configuration file, also can be the numerical value be set in by user in mobile phone file system).Equally can saves energy, extend the working time of terminal
In present embodiment, after the step s 15, also comprise before step S16:
Step S20, adds the mark of instruction to the wireless switching of lantern slide to blue-teeth data.
Because the blue-teeth data being connected transmission by bluetooth comprises various data and instruction, correctly will tell the switching of realization to lantern slide of the object of the invention, need to tell to page up switching command and downward one page switching command.Adding mark by the head end of the blue-teeth data of encoding to page up switching command and downward one page switching command or tail end or head end tail end simultaneously, succinct, can with * ##* as this mark, certainly, not only for therewith, as long as whether can help clear, easily to tell this blue-teeth data is can to the mark of page up switching command and downward one page switching command.
The embodiment of the present invention, by increasing step S17 to S20, by detect bluetooth connect whether can with and whether enter slide demonstration pattern can saves energy, extend the working time of terminal, can know that distinguishing blue-teeth data is easily to page up switching command or downward one page switching command by adding mark, or other blue-teeth data.
Consult Fig. 4, Fig. 4 is that the present invention utilizes terminal to carry out the process flow diagram of method the 4th embodiment of the wireless switching of lantern slide.
Step S21, lantern slide playback equipment receives the blue-teeth data of the switching lantern slide of self terminal.
Such as, lantern slide playback equipment, refers generally to computer, set up after bluetooth is connected with terminal, receive the blue-teeth data of self terminal, this blue-teeth data specially refers to the instruction for switching lantern slide, namely by the blue-teeth data of encoding to page up switching command or downward one page switching command.Because only the blue-teeth data of this type is effective for purposes of the invention.
Step S22, decoding blue-teeth data, obtains to page up switching command or downward one page switching command.
Such as, decode by the blue-teeth data of encoding to page up switching command or downward one page switching command, be reduced into page up switching command or downward one page switching command, be namely reduced into simple machine code (0 or 1).
Step S23, will become to page up switching command or downward one page switching command corresponding conversion and trigger keyboard key assignments or the keyboard of one page triggering downwards key assignments to page up.
Such as, actual trigger slides will be corresponded to page up switching command and trigger keyboard key assignments to page up, and downward one page switching command be corresponded to the downward one page of actual trigger slides and trigger keyboard key assignments.If a left side is got rid of and represented to page up and switch, convert switching command that is 0 to, the keyboard key assignments that lantern slide switches to page up is P, and in real work, by 0 corresponding P, the effect triggering 0 is identical with the effect of triggering P.
Step S24, according to triggering keyboard key assignments or the keyboard of one page triggering downwards key assignments switching lantern slide to page up.
Such as, the keyboard key assignments that trigging control lantern slide switches, and after the application of lantern slide receives keyboard value, be pressed the same with actual keyboard, thus the application of control lantern slide switches.
The embodiment of the present invention, by the blue-teeth data that receiving terminal sends, and resolve the acquisition of this blue-teeth data to page up switching command or downward one page switching command, and corresponded to keyboard key assignments corresponding to lantern slide playback equipment, finally can realize the page turning to lantern slide, without the need to button, Consumer's Experience can be strengthened.
Consult Fig. 5, Fig. 5 is that the present invention utilizes terminal to carry out the process flow diagram of method the 5th embodiment of the wireless switching of lantern slide.Between step S21 and step S22, also comprise:
Step S25, judges whether blue-teeth data comprises the mark of instruction to the wireless switching of lantern slide.
If comprise the mark of instruction to the wireless switching of lantern slide, after removing this mark, carry out the step be decoded into by blue-teeth data to page up switching command or downward one page switching command, namely carry out step S22; Otherwise do not carry out the step be decoded into by blue-teeth data to page up switching command or downward one page switching command, namely do not carry out step S22.By judge this blue-teeth data be whether the object of the invention realize lantern slide page-turning function, terminal electricity consumption can be saved further, extend the terminal works time.
Consult Fig. 6, Fig. 6 is the structured flowchart of mobile communication terminal first embodiment of the present invention.The present embodiment comprises: the first bluetooth module 1, action sensing module 2, judge module 3, first modular converter 4 and coding module 5.
First bluetooth module 1, is connected for the bluetooth set up between lantern slide playback equipment;
Action sensing module 2, connects the first bluetooth module 1, for setting up the size and Orientation obtaining terminal acceleration after bluetooth connects;
Judge module 3, connecting moves induction module 2, for judging whether the size of acceleration reaches first threshold;
First modular converter 4, connection judgment module 3, if reach first threshold for the size of acceleration, direction according to acceleration converts switching command to, if the direction of acceleration is first direction, convert to page up switching command, if the direction of acceleration is second direction, convert downward one page switching command to;
Coding module 5, connects the first modular converter 4, for being encoded into blue-teeth data to page up switching command or downward one page switching command;
First bluetooth module 1, also connects coding module 5, sends blue-teeth data for being connected by bluetooth to lantern slide playback equipment.
The embodiment of the present invention, increases the first bluetooth module 1, action sensing module 2, judge module 3, first modular converter 4 and coding module 5.The size and Orientation of the acceleration of this terminal is responded to by action sensing module 2, judge module 3 judges to reach first threshold when acceleration magnitude, first modular converter 4 according to the direction of acceleration this action is converted into lantern slide to page up switching command or one page switching command downwards, coding module 5 is converted into blue-teeth data, and transmit this instruction by the first bluetooth module 1, realize the switching of lantern slide to page up or downward one page, hardware can not be increased, save cost, and improve convenience.
Consult Fig. 7, Fig. 7 is the structured flowchart of mobile communication terminal second embodiment of the present invention.This enforcement is with the difference of mobile communication terminal second embodiment, comprising: first detection module 6 and the second detection module 7.
First detection module 6, be connected between the first bluetooth module 1 and action sensing module 2, whether be currently connected available with the bluetooth between lantern slide playback equipment for detecting and whether enter slide demonstration pattern, if be all, carrying out the step of the size and Orientation obtaining terminal acceleration; Otherwise do not carry out the step of the size and Orientation obtaining terminal acceleration.
Second detection module 7, be connected between judge module 3 and the first modular converter 4, whether can use for detecting bluetooth connection, if then carry out the step converting switching command according to the direction of acceleration to, otherwise not carrying out the step converting switching command according to the direction of acceleration to.
The embodiment of the present invention, increases first detection module 6 and the second detection module 7, by detecting bluetooth connection status and slide demonstration mode state, can save terminal electricity consumption, lengthening working hours.
Consult Fig. 8, Fig. 8 is the circuit diagram of mobile communication terminal second embodiment of the present invention.Terminal comprises the first bluetooth module 1, action sensing module 2 and baseband chip 8.
First bluetooth module 1 comprises Bluetooth chip 11 and Bluetooth antenna 12, and this Bluetooth chip 11 comprises the 4th power interface 111, first signal transmission interface 112, first Signal reception interface 113 and antennal interface 114.
Action sensing module 2 comprises the first sequential interface 21, first data-interface 22, first interrupt interface 23 and the first power interface 24.
Baseband chip 8 comprises the second sequential interface 81, second data-interface 82, second interrupt interface 83, secondary signal transmission interface 84, secondary signal receiving interface 85.Baseband chip 8 also comprises power management module 86, and power management module 86 comprises second source interface 861 and the 3rd power interface 862.
First sequential interface 21 connects the second sequential interface 81, first data-interface 22 and connects the second data-interface 82, first interrupt interface 23 and connect the second interrupt interface 83, first power interface 24 and connect second source interface 861.
4th power interface 862 connects the 3rd power interface 111, first signal transmission interface 84 and connects secondary signal transmission interface 112, first Signal reception interface 85 and connect secondary signal receiving interface 113, and antennal interface 114 connects Bluetooth antenna 12.
The principle of work of the embodiment of the present invention is:
Action sensing module 2 is connected with baseband chip 8 by serial data interface (I2C), the direction of the acceleration that baseband chip 8 is caught by serial data interface read action induction module 2 and size data, and carries out data initialization to action sensing module 2.Meanwhile, baseband chip 8 has an interrupt pin (INT) to be connected with action sensing module 2, and this interrupt pin is used for when action sensing module 2 has data to produce, by interrupt notification baseband chip 8.Power management module 86 in baseband chip 8 is responsible for powering to action sensing module 2.First bluetooth module 1 is connected with baseband chip 8 by parallel data grabbing card (UART), baseband chip 8 carries out communication by parallel data grabbing card and the first bluetooth module 1, comprise the blue-teeth data on acquisition first bluetooth module 1, and action sensing module 2 is controlled etc.Power management module in baseband chip 8 is responsible for powering to action sensing module 2.Action sensing module 2 is connected with antenna 12 through baseband chip 8, is received and send blue-teeth data by antenna 12.
In above-described embodiment, action sensing module 2 is acceleration transducers.
Consult Fig. 9, Fig. 9 is the structured flowchart of lantern slide playback equipment first embodiment of the present invention.This mobile communication terminal comprises: the second bluetooth module 100, decoder module 200, second modular converter 300 and handover module 400.
Second bluetooth module 100, is connected for the bluetooth set up between terminal, and for setting up the blue-teeth data receiving the switching lantern slide of self terminal after bluetooth connects;
Decoder module 200, connects the second bluetooth module 100, for blue-teeth data of decoding, obtains to page up switching command or downward one page switching command;
Second modular converter 300, connects decoder module 200, triggers keyboard key assignments for becoming to page up switching command or downward one page switching command corresponding conversion to page up triggering keyboard key assignments or downward one page; And
Handover module 400, connects the second modular converter 300, for switching lantern slide according to page up triggering keyboard key assignments or the keyboard of one page triggering downwards key assignments.
The embodiment of the present invention, increase the second bluetooth module 100, decoder module 200, second modular converter 300 and handover module 400, by the blue-teeth data that the second bluetooth module 100 receiving terminal sends, decoder module 200 is resolved this blue-teeth data and is obtained to page up switching command or downward one page switching command, keyboard key assignments corresponding to lantern slide playback equipment is corresponded to by the second modular converter 300, last handover module 400 realizes the switching (page turning) to lantern slide, without the need to button, Consumer's Experience can be strengthened.
The foregoing is only embodiments of the invention; not thereby the scope of the claims of the present invention is limited; every utilize instructions of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.