Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a method and a system for optimizing a control method of controlling a drainer, realizing wireless control of the drainer, and realizing the purposes of simpler logic control of the drainer and safer use.
In order to achieve the above object, the method for draining water based on wireless control of a drainer provided by the invention comprises the following steps:
s1: receiving a wireless control signal sent by a touch button;
s2: code matching analysis is carried out on the received wireless control signals, and whether the wireless control signals correspond to the control output downlink signals or not is judged;
s3: if yes, outputting the control output drainage signal and controlling the electromagnetic valve to conduct corresponding drainage action.
Further, step S2 includes:
a21: judging whether the time for receiving the wireless control signal sent by the touch button exceeds the preset learning starting time or not;
a22: if yes, learning and editing the sewage control coding information according to the received wireless control signal, and storing the sewage control coding information; if not, step A21 is performed.
Further, step S2 includes:
b21: judging whether the time for receiving the wireless control signal sent by the touch button exceeds the preset completion time or not;
b22: if yes, finishing learning and editing the sewage control coding information.
Further, step S2 includes:
c21: judging whether the interval time of receiving the wireless control signal exceeds the preset reset time or not;
c22: if yes, the information of the drain control codes is cleared and learned and edited.
A system for wireless control of a drainer, comprising:
the wireless signal receiving module is used for receiving a wireless control signal sent by the touch button;
the editing button coding module is used for performing code matching analysis on the received wireless control signal and judging whether the wireless control signal corresponds to a control output sewage signal or not;
and the control output signal module is used for outputting the control output drainage signal and controlling the electromagnetic valve to perform corresponding drainage action when the wireless control signal corresponds to the control output drainage signal.
Further, the edit button coding module includes:
a learning start judging unit for judging whether the time for receiving the wireless control signal sent by the touch button exceeds a preset learning start time;
and the learning editing coding unit is used for learning and editing the sewage control coding information according to the received wireless control signal when the time for receiving the wireless control signal sent by the touch button exceeds the preset learning starting time, and storing the information.
Further, the edit button coding module includes:
the learning completion judging unit is used for judging whether the time for receiving the wireless control signal sent by the touch button exceeds the preset completion time;
and the learning coding completion unit is used for completing learning and editing the sewage control coding information when the time for receiving the wireless control signal sent by the touch button exceeds the preset completion time.
Further, the edit button coding module includes:
the code reset judging unit is used for judging whether the interval time for receiving the wireless control signal exceeds the preset reset time;
and the reset clearing coding unit is used for clearing learning and editing the information of the sewage control code when the interval time of receiving the wireless control signal exceeds the preset reset time.
The beneficial effects of the invention are as follows:
(1) The wireless control signal is received, and the control instruction of the wireless control signal is read through the chip decoding, so that the preset water draining action of the electromagnetic valve is controlled, the wired control structure is optimized, and the safety problem of electric leakage brought by the wired control electromagnetic valve is reduced.
(2) Through receiving wireless control signal, utilize action study and the edit of code to carry out touch button's control, the user can control the drainer according to own action habit's drainage, has improved user experience, has increased the practicality.
Detailed Description
The following are specific embodiments of the present invention and the technical solutions of the present invention will be further described with reference to the accompanying drawings, but the present invention is not limited to these embodiments.
Example 1
The embodiment provides a method for draining water based on wireless control of a drainer, as shown in fig. 1 to 2, the method includes:
in order to achieve the above object, the method for draining water based on wireless control of a drainer provided by the invention comprises the following steps:
s1: receiving a wireless control signal sent by a touch button;
s2: code matching analysis is carried out on the received wireless control signals, and whether the wireless control signals correspond to the control output downlink signals or not is judged;
s3: if yes, outputting the control output drainage signal and controlling the electromagnetic valve to conduct corresponding drainage action.
Further, step S2 includes:
a21: judging whether the time for receiving the wireless control signal sent by the touch button exceeds the preset learning starting time or not;
a22: if yes, learning and editing the sewage control coding information according to the received wireless control signal, and storing the sewage control coding information; if not, step A21 is performed.
Further, step S2 includes:
b21: judging whether the time for receiving the wireless control signal sent by the touch button exceeds the preset completion time or not;
b22: if yes, finishing learning and editing the sewage control coding information.
Further, step S2 includes:
c21: judging whether the interval time of receiving the wireless control signal exceeds the preset reset time or not;
c22: if yes, the information of the drain control codes is cleared and learned and edited.
The method for controlling the drainer based on wireless control provided by the embodiment comprises the following specific implementation steps:
firstly, a preset action signal of a user is received through a touch button, then the preset action signal is transmitted to a wireless receiving module of the drainer in a wireless mode, the wireless receiving module transmits the received preset action signal to a control module, the control module analyzes the received preset action signal in a code matching mode, whether the preset action signal is an output signal for controlling the drainer or not is judged, if yes, the electromagnetic valve is output and controlled to conduct preset draining action, and accordingly the drainer is controlled.
According to the method for controlling the drainer to drain water in the wireless mode, wireless control is achieved, the structure for controlling the drainer is optimized, the safety of controlling the drainer to drain water is improved, operation is conducted through the touch buttons, and user experience is improved.
Further, when the user performs the wireless control of the drainer to drain, the preset action of the wireless control of the drainer is that the user can learn and edit the coded information of the touch button, and the specific method comprises the following steps: and (3) starting preset action learning, finishing the preset action learning, and clearing the preset action learning code.
The method comprises the steps of starting preset action learning, namely action learning of a user preset operating a touch button, judging whether the time for receiving a wireless control signal sent by the touch button exceeds preset learning starting time, for example, entering a preset action learning mode when the time for receiving the wireless control signal sent by the touch button exceeds 4S, performing learning for controlling action of a drainer, performing learning and editing drain control coding information according to the received wireless control signal, and storing the drain control coding information.
The completion of the preset action learning, that is, the completion of the action learning of the user preset operation touch button, that is, when the time for receiving the wireless control signal sent by the touch button exceeds the preset completion time, for example, when the time for receiving the wireless control signal sent by the touch button exceeds 10S, the coded information of the learning and editing of the preset action is judged, and at this time, the coded information is stored in the drainer sewer module.
The preset action learning codes are cleared, namely preset actions and code information stored by a previous user are cleared, so that resetting can be achieved, misoperation is avoided, the user can set according to own operation habits, and user experience is improved.
According to the method for controlling the drainer based on the wireless mode, which is provided by the embodiment, the method for controlling the drainer to drain is optimized, the safety of drainer control is improved, touch operation can be set according to the operation habit of a user, and the user experience is improved.
Example two
The embodiment provides a system for draining water based on wireless control of a drainer, as shown in fig. 3 to 4, the system includes:
the wireless signal receiving module is used for receiving a wireless control signal sent by the touch button;
the editing button coding module is used for performing code matching analysis on the received wireless control signal and judging whether the wireless control signal corresponds to a control output sewage signal or not;
and the control output signal module is used for outputting the control output drainage signal and controlling the electromagnetic valve to perform corresponding drainage action when the wireless control signal corresponds to the control output drainage signal.
Further, the edit button coding module includes:
a learning start judging unit for judging whether the time for receiving the wireless control signal sent by the touch button exceeds a preset learning start time;
and the learning editing coding unit is used for learning and editing the sewage control coding information according to the received wireless control signal when the time for receiving the wireless control signal sent by the touch button exceeds the preset learning starting time, and storing the information.
Further, the edit button coding module includes:
the learning completion judging unit is used for judging whether the time for receiving the wireless control signal sent by the touch button exceeds the preset completion time;
and the learning coding completion unit is used for completing learning and editing the sewage control coding information when the time for receiving the wireless control signal sent by the touch button exceeds the preset completion time.
Further, the edit button coding module includes:
the code reset judging unit is used for judging whether the interval time for receiving the wireless control signal exceeds the preset reset time;
and the reset clearing coding unit is used for clearing learning and editing the information of the sewage control code when the interval time of receiving the wireless control signal exceeds the preset reset time.
According to the system based on the wireless control of the drainer, when the touch button receives the preset action of the user, the preset action signal is sent to the wireless receiving module of the drainer in a wireless mode, then the wireless receiving module sends the received preset action signal to the control output signal module, the control output signal module analyzes the code of the received preset action signal, and accordingly whether the preset action signal is an output signal of the drainer is judged, if yes, the electromagnetic valve is output and controlled to conduct preset drainage action, and accordingly drainer drainage is controlled.
The edit button coding module in the system comprises a learning start judging unit, a learning edit coding unit, a learning completion judging unit, a learning coding completion unit, a coding reset judging unit and a reset clearing coding unit.
The unit provided in this embodiment may perform learning to control the action of the drainer by determining, by the learning start determining unit, whether the time for receiving the wireless control signal sent by the touch button exceeds a preset learning start time, for example, when determining that the time for receiving the wireless control signal sent by the touch button exceeds 4S, that is, entering a preset action learning mode, and performing learning and editing of the drain control code information by the learning and editing encoding unit according to the received wireless control signal, and storing the drain control code information.
When the learning completion judging unit judges that the time for receiving the wireless control signal sent by the touch button exceeds the preset completion time, for example, when the time for receiving the wireless control signal sent by the touch button exceeds 10S, the learning of the preset action and the code information for editing the water supply control can be judged, and after the code learning is judged to be completed, the code information for the code learning is stored by the code learning completion unit.
The preset actions and the coded information stored by the previous user are cleared through the coded reset judging unit, so that resetting can be achieved, misoperation is avoided, the user can set according to own operation habits, and user experience is improved.
According to the system based on the wireless control drainer, the structure for controlling the drainer to drain is optimized, the safety of drainer control is improved, touch operation can be set according to the operation habit of a user, and user experience is improved.
The specific embodiments described herein are offered by way of example only to illustrate the spirit of the invention. Those skilled in the art may make various modifications or additions to the described embodiments or substitutions thereof without departing from the spirit of the invention or exceeding the scope of the invention as defined in the accompanying claims.