Disclosure of Invention
The embodiment of the invention provides a terminal control ring, a terminal and a computer readable storage medium, and aims to provide a ring and a method for conveniently interacting with a mobile terminal.
In view of this, in a first aspect of the embodiments of the present invention, a terminal control ring is provided, including:
an annular body;
the rotating ring is sleeved on the annular main body and can rotate relative to the annular main body;
the rotary encoder is connected with the rotating ring and used for sending different pulse signals according to the rotation of the rotating ring;
the microcontroller is fixed on the annular main body, is electrically connected with the rotary encoder and is used for analyzing the pulse signal;
and the wireless transmission module is connected with the microcontroller and used for sending the analyzed pulse signals.
In one possible design, the rotary encoder includes:
the conducting strip is fixed on the inner wall of the rotating ring;
and the metal contacts are arranged on the outer surface of the annular main body and are used for being in contact with the conducting strips.
In one possible design, the plurality of metal contacts are equally spaced on the outer surface of the ring-shaped body.
In one possible design, each metal contact is connected to a GPIO port of the microcontroller.
In one possible design, the conductive sheet can simultaneously short circuit at least two adjacent metal contacts.
In one possible design, the device further comprises a micro laser sensor fixed on the outer surface of the annular body and connected with the microprocessor; the miniature laser sensor can emit at least two beams of laser and can sense whether the at least two beams of laser are shielded.
In one possible embodiment, the rotating ring is provided with at least 2 through holes for the laser to pass through.
A second aspect of the embodiments of the present invention provides a terminal control method, including:
acquiring a pulse signal or a shielding signal of a laser beam emitted by a rotary encoder;
analyzing the pulse signal or the shielding signal of the laser beam;
and sending the analyzed signal to a terminal.
In one possible design, the acquiring the pulse signal or the blocking signal of the laser beam emitted by the rotary encoder includes: and if the laser beam is in a use state, judging whether the rotating ring is pressed or not through a pulse signal sent by the rotary encoder.
A third aspect of the embodiments of the present invention provides a computer-readable storage medium, where a ring control program is stored on the computer-readable storage medium, and when the ring control program is executed by a processor, the steps of the method for controlling a terminal provided in the embodiments of the present invention are implemented.
According to the technical scheme, in the embodiment of the invention, the sliding direction and speed of the finger on the screen are determined by different rotation parameters of the rotating ring, including the rotating direction and the rotating speed.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like.
Referring to fig. 1, fig. 1 is a schematic diagram of an embodiment of a terminal control ring according to the present invention, including:
a ring-shaped body 10;
a rotatingring 20 fitted around the annularmain body 10 and rotatable with respect to the annularmain body 10;
arotary encoder 50 connected to the rotatingring 20 for generating different pulse signals according to the rotation of the rotatingring 20;
amicrocontroller 30 fixed on theannular body 10 and electrically connected to therotary encoder 50 for analyzing the pulse signal;
and awireless transmission module 40 connected to themicrocontroller 30 and configured to send the analyzed pulse signal.
A power supply is also included and is connected to therotary encoder 50.
Referring to fig. 2, in the present embodiment, therotary encoder 50 includes a plurality ofmetal contacts 51 and aconductive sheet 52; wherein ametal contact 51 is provided on an outer surface of the ring-shaped body 10; theconductive plate 52 is fixed to the inner wall of the rotatingring 20 so that theconductive plate 52 is rotated when the rotatingring 20 is rotated.
In a specific implementation, the metal contacts may be disposed on the outer surface of the ring-shaped body 10 at equal intervals, and each metal contact is connected to a GPIO port of themicrocontroller 10. Theconductive sheet 52 is grounded and can simultaneously short circuit at least two adjacent metal contacts; when metal contacts Pin1, Pin2, Pin3 and Pin4 are uniformly distributed on the outer wall of the ring body along the circumferential direction, each contact is connected with a GPIO port of the microcontroller, the default high level is high, and when the conductingstrip 52 crosses the metal contacts, a certain change sequence is provided (0 represents low level, 1 represents high level):
rotating a grid: pin1 ═ 0, Pin2 ═ 0, Pin3 ═ 1, and Pin4 ═ 1
Rotating the second grid: pin1 ═ 1, Pin2 ═ 0, Pin3 ═ 0, and Pin4 ═ 1
Rotating three grids: pin1 ═ 1, Pin2 ═ 1, Pin3 ═ 0, and Pin4 ═ 0
Microcontroller 30 can determine from this that the user has slid several metal contacts and can also determine the direction of the sliding in two low-level displacement directions. That is, the analyzed pulse signal transmitted by the wireless transmission module includes the number of sliding grids STEP (i.e., the number of sliding metal contacts) and the sliding direction.
It should be noted that the number of metal contacts can be determined by the pin resources and the structural volume of the microcontroller, and the number of metal contacts determines the accuracy (resolution) of the sliding.
Referring to fig. 3 again, the terminal control ring provided by the present invention can be worn on the index finger of the user, and the rotatingring 20 can be conveniently rotated with respect to thering body 10 by the thumb. In addition, in another embodiment of the present invention, in order to make the user know the number of the rotating frames clearly, a sound or vibration may be generated to prompt each rotating frame.
In any of the above embodiments, by rotating the rotatingring 20 relative to thering body 10 to trigger the pulse of the rotary encoder, the microcontroller analyzes the STEP signal and the direction signal according to the pulse signal, and transmits the STEP signal and the direction signal to the mobile terminal through the wireless transmission module, for example: page up/down, song list scrolling, etc. The wireless transmission module can inform the mobile terminal to perform corresponding actions through bluetooth, wifi, zigbee and other modes not limited to the wireless mode.
Referring to fig. 4 and 5, on the basis of any of the above embodiments, the present invention further provides a terminal control ring, which includes amicro laser sensor 60, in addition to the ring-shapedmain body 10, the rotatingring 20, therotary encoder 50, themicrocontroller 30, and thewireless transmission module 40, fixed on the outer surface of the ring-shapedmain body 10, and connected to themicroprocessor 30 and the power supply; themicro laser sensor 60 can emit at least two laser beams and can sense whether the at least two laser beams are blocked. At this time, at least 2 throughholes 21 are formed in therotating ring 20 for the laser to pass through, thereby achieving unobstructed emission of the laser.
Based on this, we can realize the operation of "separating the space", and thisminiature laser sensor 60 can judge the precedence order that two bundles of laser are sheltered from to this differentiates the slip direction, and we can realize based on this characteristic for example "separating the space and changing music", also can shelter from two laser beams simultaneously and realize "pause and broadcast", or shelter from two laser beams simultaneously many times, realize more interactive functions that can set for.
In this embodiment, themicro laser sensor 60 may use "VL 53L 0X" derived from ST semiconductor as a core sensor, and the VL53L0X has a ranging length of 2 meters and an accuracy within ± 3%. The power consumption in the normal working mode is only 20mW, and the standby power consumption is only 5 muA. The packaging size is 2.4mmx4.4mmx1mm, the volume is smaller in the similar products on the market,
as shown in fig. 4, themicro laser sensor 60 communicates with the microcontroller via SCL and SDA, i.e., I2C communication protocol, and the microcontroller controls VL53L0X in real time, processes the measurement data and the motion data, and then feeds back the obtained command to the mobile terminal via the wireless transmission module, and finally the mobile terminal performs corresponding motion.
When the VL53L0X is used, the distance measurement can be performed using the same; unlike conventional infrared proximity detection sensors (infra red proximity sensors), VL53L0X outputs a range finding accurate to millimeters, and the color and reflected light of the target object do not affect the range finding and can distinguish lateral or longitudinal movement of the target object. The distance measurement calculation is completed inside the sensor, and the data is output through an I2C bus interface, so that the requirement on a system main controller is reduced to the minimum.
That is to say, when adopting above-mentioned VL53L0X, the distance measuring function can also be realized to the terminal control ring, and VL53L0X can provide the length and be 2 meters, and the accuracy is at the distance measuring function of 3% range, makes things convenient for some trade staff to carry out the rapid survey to watch data through the mobile terminal screen in real time, this is just as convenient as the carpenter holds the pencil at any time. More specifically, if it is detected that the rotating ring is pressed without being fluctuated and the laser is turned on, the ranging operation is performed.
As shown in fig. 6, the present invention further provides a terminal control method, including:
601. starting;
602. acquiring a pulse signal or a shielding signal of a laser beam emitted by a rotary encoder;
in specific implementation, the terminal control ring provided in any embodiment of the present invention may be adopted, as specifically described above, and is not described herein again;
603. analyzing the pulse signal or the shielding signal of the laser beam;
when analyzing the pulse signal, the number of the grids (that is, the number of the metal contacts that slide) and the direction of the sliding of the analyzed content; when the shielding signal of the laser beam is analyzed, the analyzed content comprises the sequence of the shielded laser and the number of the shielded laser beams at one time;
604. sending the analyzed signal to a terminal;
605. and (6) ending.
The steps are realized by the terminal control ring provided by any embodiment of the invention; after receiving the analyzed signal, the terminal may determine the content of the current operation interface, such as browsing a webpage, reading a novel or playing a song, and the like; if the webpage is browsed or the novel is read, the webpage or the novel is rolled forwards or backwards through the STEP page according to the number STEP of the sliding grids and the sliding direction, or the webpage or the novel is rolled forwards or backwards according to the sequence of the shielded laser; if the song is played, the song is switched to the STEP head forwards or backwards according to the sliding grid number STEP and the sliding direction, or the song is switched to the STEP head forwards or backwards according to the sequence of the blocked laser. If two beams of shielded laser are available at a time, the operation of pause or play can be correspondingly carried out.
On the basis of the embodiment corresponding to fig. 6, an embodiment of the present invention further provides a terminal control method, where the acquiring a pulse signal or a shielding signal of a laser beam emitted by a rotary encoder includes: and if the laser beam is in a use state, judging whether the rotating ring is pressed or not through a pulse signal sent by the rotary encoder.
That is, generally, if the micro laser sensor emitting the laser beam is in an operating state, it is only necessary to analyze whether the rotary ring is pressed or not from the pulse signal of the rotary encoder; if pressed, a predetermined function is performed, such as ranging. Thus, when the micro laser sensor is started, if the rotating ring needs to be rotated so that the laser can pass through the through hole of the rotating ring, misoperation cannot be caused.
The invention further provides a computer-readable storage medium, wherein a ring control program is stored on the computer-readable storage medium, and when being executed by a processor, the ring control program realizes the steps of the terminal control method provided by any embodiment of the invention.
More specifically, the ring control program is executed by a processor to implement the steps of: acquiring a pulse signal or a shielding signal of a laser beam emitted by a rotary encoder; in specific implementation, the terminal control ring provided in any embodiment of the present invention may be adopted, as specifically described above, and is not described herein again;
analyzing the pulse signal or the shielding signal of the laser beam; when analyzing the pulse signal, the number of the grids (that is, the number of the metal contacts that slide) and the direction of the sliding of the analyzed content; when the shielding signal of the laser beam is analyzed, the analyzed content comprises the sequence of the shielded laser and the number of the shielded laser beams at one time;
and sending the analyzed signal to a terminal.
When acquiring a pulse signal or a blocking signal of a laser beam emitted by a rotary encoder, the ring control program is executed by a processor to realize the following steps: and if the laser beam is in a use state, judging whether the rotating ring is pressed or not through a pulse signal sent by the rotary encoder.
That is, generally, if the micro laser sensor emitting the laser beam is in an operating state, it is only necessary to analyze whether the rotary ring is pressed or not from the pulse signal of the rotary encoder; if pressed, a predetermined function is performed, such as ranging. Thus, when the micro laser sensor is started, if the rotating ring needs to be rotated so that the laser can pass through the through hole of the rotating ring, misoperation cannot be caused.
According to the terminal control ring, the device and the computer readable storage medium provided by the embodiment of the invention, the rotary encoder is driven by the rotary ring which can be dialed on the ring, and the microprocessor can judge the number and direction of the sliding grids according to the on-off sequence of the GPIO port; in addition, there are a plurality of through-holes on the rotatory ring of ring, utilize the laser beam that miniature laser sensor sees through, can realize need not to stir the ring on the ring, only need separate the empty gesture and just can trigger an action, this miniature laser sensor has two laser beams at least, can distinguish the direction, can provide more methods of controlling for mobile terminal like this, for example, can separate the empty music song purpose last song/next song switching, finally, inform mobile terminal through radio emitter, this miniature laser sensor has the range finding function concurrently in addition, the precision is higher, relevant trade personnel can be convenient carry out the quick range finding function through it, make the mobile terminal operation under more scenes become more convenient.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.