Embodiment
Below in conjunction with the drawings and specific embodiments embodiments of the invention are described in further detail.
As shown in Figure 1, the process flow diagram for the inventive method embodiment one comprises:
S101 obtains the angle that the handheld terminal roller rolls on testee,
In embodiments of the present invention, the handheld terminal roller can be measured the length of straight line object, also can test the length of curve object.
S103 according to the angle that described roller rolls, obtains the length of described testee on described testee.
In embodiments of the present invention, the angle of utilizing roller on testee, to roll, girth in conjunction with roller can obtain the length that roller rolls across, this length is the length of testee, the length that roller rolls across equals girth and multiply by the rotation number of turns, and the rotation number of turns of roller equals the angle of roller rotation divided by 360.
The angle that embodiments of the invention roll on testee by the roller that obtains handheld terminal obtains the length of testee, has satisfied the demand that the user utilizes the handheld terminal Measuring Object length carried effectively.
As shown in Figure 2, the process flow diagram for another embodiment of the inventive method comprises:
S201 obtains on the roller equally distributed boss through the number of times of testee.,
In embodiments of the present invention, in the side of roller equally distributed boss is set, is having boss one side that microswitch is installed, microswitch is a kind of high-speed switch of exerting pressure and actuating, and is sensitive switch again.Its principle of work is that outer mechanical force is passed through actuated element, such as, push-piece, button, lever, roller etc., masterpiece is used to move reed, and with energy accumulation after critical point, produce snap action, the moving contact and the fixed contact of action reed end are switched on or switched off fast.After the acting force on the actuated element was removed, the action reed produced counteragent power, reach the action critical point of reed when the actuated element reverse stroke after, the instantaneous counteragent of finishing.The contact spacing of microswitch is little, actuating length is short, press that power is little, break-make is rapid.The responsiveness of its moving contact and actuated element responsiveness are irrelevant.When roller rolls, will press switch during boss process microswitch, just can write down the number of times of the boss of process by the number of times of record switch closure.
S203, the number of times and the angle between adjacent two boss that pass through testee according to the roller convex platform obtain the angle that roller rolls on testee.
In embodiments of the present invention, because boss is equally distributed, angle between then adjacent two boss is known, therefore the angle that rolls across of roller equals the angle * switch closure number of times between two boss, can change the precision of linear measure longimetry by the quantity of adjusting boss, boss measuring accuracy more at most is high more.
S205, the length of the angle calculation testee that on described testee, rolls according to the girth and the described roller of described roller.
In embodiments of the present invention, utilize the girth of roller and the product of the roller rolling number of turns can obtain the length that roller rolls across, wherein, the number of turns that roller rolls across be the angle that rolls across of roller divided by 360, the length of the length testee that roller rolls across.
Need to prove,, in another embodiment of the present invention, also can obtain the angle that roller rolls by utilizing the grating on the roller except by utilizing the boss on the roller to obtain the angle that roller rolls.On roller, be carved with grating, the emitter and the receiving device of optoelectronic switch are housed respectively in the both sides of roller, the action of this optoelectronic switch starts alternately according to the optical transmitting set of roller both sides and the light signal between the optical receiver, when having the shading object to block between emitter and the receiving device, optoelectronic switch disconnects, when between emitter and the receiving device during clear, the optoelectronic switch closure.So when roller rolls, because the existence of grating makes the continuous disconnection of optoelectronic switch closed, just can write down the number of times of the grating of process by the closed number of times of recording light electric switch, thereby obtain the angle that roller rolls across, the angle of utilizing roller to roll across can obtain the length of testee.
In the embodiment of the invention, by utilizing boss or the grating on the roller, number of times according to boss on the roller or grating process obtains the angle that roller rolls across, thereby obtains the length of testee, has satisfied the user effectively and has utilized the handheld terminal demand of Measuring Object length easily.
As shown in Figure 3, the structural representation for handheld terminal embodiment of the present invention comprises:
Roller 31 is used for rolling on testee,
Acquiring unit 32 is used to obtain the angle that described roller rolls on described testee,
Use processing unit 33, be used for the angle of on described testee, rolling, obtain the length of described testee according to described roller.
In embodiments of the present invention, can on roller 31, boss be set, as shown in Figure 4, and utilize the action of microswitch, such as boss through out-of-date, the microswitch closure, thereby, closed number of times by the fine motion beginning is added up the number of times of roller convex platform process on testee, also can grating be set on roller, as shown in Figure 5, and utilize the action of optoelectronic switch, such as, the running that utilizes corresponding optical transmitter that is provided with in roller both sides and the light signal between the optical receiver to start optoelectronic switch alternately is when roller rolls on testee, during through grating, the optoelectronic switch closure, thus the number of times of grating process on testee on the roller added up by the closed number of times of photoelectricity fine motion beginning.
Acquiring unit 32 further comprises:
Statistical module 321 is used to add up the action frequency of described microswitch or optoelectronic switch,
Angle acquisition module 322 is used for the switch motion number of times according to described statistical module counts, obtains the angle that described roller rolls.
When microswitch or optoelectronic switch action, send corresponding switching signal to acquiring unit 32, statistical module 321 at first carries out zero clearing when the statistics beginning, when receiving switching signal, judge whether to be switch closure signals that when then receiving the switch cut-off signal after receiving switch closure signals, the counter of statistical module adds 1 automatically, with realization the action frequency of microswitch or optoelectronic switch is added up, this action frequency is the number of times of roller convex platform or grating process.Angle acquisition module 322 utilizes the angle of this number of times and adjacent two boss or grating can obtain the angle that roller rolls on testee.
In embodiments of the present invention, the angle that the roller of application processing unit 33 reception acquiring units 22 outputs rolls on testee according to the corresponding calculated formula, obtains the length that roller rolls on testee, and this length is the length of testee.
In embodiments of the present invention, the user is known the length of measured testee for convenience, can also comprise Tip element 34, and this Tip element 34 can be the display unit of handheld terminal, also can be the auditory tone cues unit of handheld terminal.
In embodiments of the present invention, handheld terminal can be a mobile phone, also can be the hand-held mobile terminal of concrete roller operation such as personal digital assistant.
The embodiment of the invention is by utilizing the roller of handheld terminal, and obtain the length of testee according to the angle that roller rolls, satisfy the user effectively and conveniently known the demand of object length, simultaneously, utilize the roller of handheld terminal itself, for handheld terminal has increased length measurement function,, further enriched the function of handheld terminal not increasing under the condition of cost.
Certainly; embodiments of the invention also can have a variety of; under the situation that does not deviate from embodiments of the invention spirit and essence thereof; those skilled in the art work as can make various corresponding changes and distortion according to embodiments of the invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of embodiments of the invention.