LED lamplight control method
Technical field
The present invention relates to LED flashlight field, is specifically a kind of LED lamplight control method.
Background technology
In prior art, the function that the illumination range of flashlight regulates is generally that manually rotary electric torch regulates the distance between LED lamp holder and reverberation bowl to regulate, also have a kind of LED flashlight to be adopt convex lens and LED lamp holder in prior art, regulating illumination scope and intensity of illumination are also regulated by the distance between adjustment LED lamp holder and convex lens.Generally regulate the distance between LED lamp holder and convex lens by motor, adopt in this way, need hand-held flashlight, press the button, etc. when being transferred to suitable, release button again, if adjustment is improper, so also needs to press another one button, control motor counter motion again to regulate, this regulative mode is manual adjustments, regulates cumbersome, intelligent and hommization degree is not high.
Summary of the invention
Technical problem to be solved by this invention is, overcomes the defect of prior art, provides one can Intelligent adjustment, the LED lamplight control method that hommization degree is high.
For solving the problems of the technologies described above, the present invention proposes a kind of LED lamplight control method, then it send wireless signal transmission regulates light brightness and scope to the control module of flashlight by detecting the multi-point touch track on touch control device, specifically comprise the following steps:
(1) control module of flashlight near, by handheld touch equipment searching for, and set up communication with control module;
(2), open the contact panel of handheld touch equipment, contact panel arrange two-dimensional coordinate system, arrange X-direction for laterally, Y direction for longitudinally, then detect touch track;
(3) touch if be detected as single-point, then obtain touch track, and detect the starting point of touch track and the position of terminal, and the distance calculated between terminal and starting point, if the direction of motion of touch track is in a coordinate system towards the right side, then be judged as improving brightness, then by the control signal of handheld touch equipment to the control module transmission raising brightness of flashlight, the size of regulated value is arranged according to the distance between terminal and starting point; Regulating illumination brightness is carried out according to the regulated value received after the control module of flashlight receives control signal;
(4) if the direction of motion of touch track is in a coordinate system towards a left side, then be judged as reducing brightness, then by the control signal of handheld touch equipment to the control module transmission reduction brightness of flashlight, the size of regulated value is arranged according to the distance between terminal and starting point; Regulating illumination brightness is carried out according to the regulated value received after the control module of flashlight receives control signal;
(5) if be detected as two touch, then obtain this touch track of 2, if this direction of motion of 2 is in the same way, then be judged as adjustment illumination brightness, now select this 2 wherein, obtain the touch track of this point, and jump to the mode that step (3) touches according to single-point and run;
(6), if this direction of motion of 2 is reverse, then detect the starting point of these two touch track and the position of terminal, and the distance between the terminal of these two touch track of Distance geometry between the starting point detecting these two touch track, if the distance between these two touch track terminals is greater than the distance between starting point, then be judged as the operation expanding illumination range, then by the operation of handheld touch equipment to the control module transmission expansion illumination range of flashlight, the size of regulated value is arranged according to the difference of the distance between the distance between two touch track terminals and starting point, the control module of flashlight receives according to the step number of the size adjustment motor operation of regulated value and direction after control signal, thus regulates the position of LED lamp holder to carry out regulating illumination scope,
(7) if the distance between these two touch track terminals is less than the distance between starting point, then be judged as the operation reducing illumination range, then by the operation of handheld touch equipment to the control module transmission reduction illumination range of flashlight, the size of regulated value is arranged according to the difference of the distance between the distance between two touch track terminals and starting point; The control module of flashlight receives according to the step number of the size adjustment motor operation of regulated value and direction after control signal, thus regulates the position of LED lamp holder to carry out regulating illumination scope.
After adopting said method, the present invention has following advantage: the present invention regulates illumination brightness and the scope of flashlight by handheld touch equipment, described handheld touch equipment can adopt mobile phone conventional at present, user directly with the control device obtaining communication of flashlight after, directly slide with hand on screen and just can adjust illumination range and brightness, the operation doing to pull open with two fingers or close operation just can adjust illumination range, and this method of adjustment has numeric reference when regulating, if user needs adjustable range less, then motion amplitude is less, if user needs adjustable range larger, then motion amplitude more greatly, very hommization, and adjustment is more accurate, easy to use.
Described handheld touch equipment is mobile phone.Mobile phone is people's common equipment, adopts in this way, and only need in mobile phone, install flashlight and regulate software, mobile phone itself has the function of monitoring screen touch-control, uses very simple and convenient.
In described step (3), the direction of motion of touch track refers to towards the right side, the value of the abscissa of the terminal of touch track is greater than the value of the abscissa of starting point in a coordinate system, in described step (4), the direction of motion of touch track refers to towards a left side, and the value of the abscissa of the terminal of touch track is less than the value of the abscissa of starting point in a coordinate system.
In described step (3) and step (4), it is that distance between terminal and starting point is larger that the size of regulated value is arranged according to the distance between terminal and starting point, regulated value is larger, in described step (6) and step (7), the size of regulated value arranges according to the difference of the distance between the distance between two touch track terminals and starting point and refers to that the difference of both is larger, and regulated value is larger.
Described wireless signal transmission is Bluetooth signal.
Embodiment
Below in conjunction with embodiment, the present invention is further detailed explanation:
The present invention proposes a kind of LED lamplight control method, it is by detecting the multi-point touch track on touch control device, then wireless signal transmission regulates light brightness and scope to the control module of flashlight is sent, the flashlight adopted described in it comprises control module, lamp light brightness regulating apparatus, the device of stepping motor adjustment LED lamp holder position, described lamplight brightness regulates the method that can adopt regulation output power or regulation voltage, the device of described stepping motor adjustment LED lamp holder position is prior art, it adopts and rotary motion is become the device of translational motion to regulate the position of LED lamp holder.Described touch control device adopts mobile phone in the present embodiment, and containing touch-screen and bluetooth module in mobile phone, be equally also provided with bluetooth module in flashlight, mobile phone and flashlight are matched by bluetooth module, then carry out Wireless Data Transmission.
Specifically comprise the following steps:
(1) control module of flashlight near, by handheld touch equipment searching for, and set up communication with control module;
(2), open the contact panel of handheld touch equipment, contact panel arrange two-dimensional coordinate system, arrange X-direction for laterally, Y direction for longitudinally, then detect touch track;
(3) touch if be detected as single-point, then obtain touch track, and detect the starting point of touch track and the position of terminal, and the distance calculated between terminal and starting point, if the direction of motion of touch track is in a coordinate system towards the right side, then be judged as improving brightness, then by the control signal of handheld touch equipment to the control module transmission raising brightness of flashlight, the size of regulated value is arranged according to the distance between terminal and starting point; Regulating illumination brightness is carried out according to the regulated value received after the control module of flashlight receives control signal;
(4) if the direction of motion of touch track is in a coordinate system towards a left side, then be judged as reducing brightness, then by the control signal of handheld touch equipment to the control module transmission reduction brightness of flashlight, the size of regulated value is arranged according to the distance between terminal and starting point; Regulating illumination brightness is carried out according to the regulated value received after the control module of flashlight receives control signal;
(5) if be detected as two touch, then obtain this touch track of 2, if this direction of motion of 2 is in the same way, then be judged as adjustment illumination brightness, now select this 2 wherein, obtain the touch track of this point, and jump to the mode that step (3) touches according to single-point and run;
(6), if this direction of motion of 2 is reverse, then detect the starting point of these two touch track and the position of terminal, and the distance between the terminal of these two touch track of Distance geometry between the starting point detecting these two touch track, if the distance between these two touch track terminals is greater than the distance between starting point, then be judged as the operation expanding illumination range, then by the operation of handheld touch equipment to the control module transmission expansion illumination range of flashlight, the size of regulated value is arranged according to the difference of the distance between the distance between two touch track terminals and starting point, the control module of flashlight receives according to the step number of the size adjustment motor operation of regulated value and direction after control signal, thus regulates the position of LED lamp holder to carry out regulating illumination scope,
(7) if the distance between these two touch track terminals is less than the distance between starting point, then be judged as the operation reducing illumination range, then by the operation of handheld touch equipment to the control module transmission reduction illumination range of flashlight, the size of regulated value is arranged according to the difference of the distance between the distance between two touch track terminals and starting point; The control module of flashlight receives according to the step number of the size adjustment motor operation of regulated value and direction after control signal, thus regulates the position of LED lamp holder to carry out regulating illumination scope.
After adopting said method, the present invention has following advantage: the present invention regulates illumination brightness and the scope of flashlight by handheld touch equipment, described handheld touch equipment can adopt mobile phone conventional at present, user directly with the control device obtaining communication of flashlight after, directly slide with hand on screen and just can adjust illumination range and brightness, the operation doing to pull open with two fingers or close operation just can adjust illumination range, and this method of adjustment has numeric reference when regulating, if user needs adjustable range less, then motion amplitude is less, if user needs adjustable range larger, then motion amplitude more greatly, very hommization, and adjustment is more accurate, easy to use.
Described handheld touch equipment is mobile phone.Mobile phone is people's common equipment, adopts in this way, and only need in mobile phone, install flashlight and regulate software, mobile phone itself has the function of monitoring screen touch-control, uses very simple and convenient.
In described step (3), the direction of motion of touch track refers to towards the right side, the value of the abscissa of the terminal of touch track is greater than the value of the abscissa of starting point in a coordinate system, in described step (4), the direction of motion of touch track refers to towards a left side, and the value of the abscissa of the terminal of touch track is less than the value of the abscissa of starting point in a coordinate system.
In described step (3) and step (4), it is that distance between terminal and starting point is larger that the size of regulated value is arranged according to the distance between terminal and starting point, regulated value is larger, in described step (6) and step (7), the size of regulated value arranges according to the difference of the distance between the distance between two touch track terminals and starting point and refers to that the difference of both is larger, and regulated value is larger.
Described wireless signal transmission is Bluetooth signal.