CN114430600A - Control method of breathing lamp, knob type switch and storage medium - Google Patents

Control method of breathing lamp, knob type switch and storage medium Download PDF

Info

Publication number
CN114430600A
CN114430600A CN202011184103.XA CN202011184103A CN114430600A CN 114430600 A CN114430600 A CN 114430600A CN 202011184103 A CN202011184103 A CN 202011184103A CN 114430600 A CN114430600 A CN 114430600A
Authority
CN
China
Prior art keywords
brightness
breathing lamp
control function
rotation angle
knob
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011184103.XA
Other languages
Chinese (zh)
Other versions
CN114430600B (en
Inventor
唐云基
徐土毅
游延筠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lumi United Technology Co Ltd
Original Assignee
Lumi United Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lumi United Technology Co Ltd filed Critical Lumi United Technology Co Ltd
Priority to CN202011184103.XA priority Critical patent/CN114430600B/en
Publication of CN114430600A publication Critical patent/CN114430600A/en
Application granted granted Critical
Publication of CN114430600B publication Critical patent/CN114430600B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/105Controlling the light source in response to determined parameters

Landscapes

  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

The embodiment of the application discloses a control method of a breathing lamp, a knob type switch and a storage medium, wherein the brightness control function of the breathing lamp is determined according to the control mode by acquiring the control mode of a knob, so that the brightness of the breathing lamp is controlled according to the brightness control function and the rotation angle of the control mode, further, the user operation is associated with the brightness of the breathing lamp, the brightness of the breathing lamp is gradually changed in brightness along with the user operation, and the user experience is improved.

Description

Control method of breathing lamp, knob type switch and storage medium
Technical Field
The embodiment of the invention relates to the field of smart home, in particular to a control method of a breathing lamp, a knob type switch and a storage medium.
Background
With the improvement of living standard, the requirements of users on household products are no longer only limited to the functions of the household products, and meanwhile, the requirements on beauty and experience are increasingly strong. The breathing lamp has a breathing frequency similar to that of breathing, has a dynamic light effect from dark to bright and from bright to dark, and is widely applied to switches of intelligent household products.
The breathing lamp of house product on the market at present usually indicates through the mode of often brightening or twinkling, and fails to interact with user operation for the suggestion mode of breathing lamp is single, experiences and feels poor.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a control method of a breathing lamp, a knob switch and a storage medium, which can control the gradual change of the brightness of the breathing lamp according to the user operation, thereby improving the user experience.
In order to solve the technical problems, the invention provides the following technical scheme:
in a first aspect, an embodiment of the present application provides a control method for a breathing lamp, which is applied to a knob switch, where the knob switch includes a knob and the breathing lamp, and the method includes:
acquiring a control mode of the knob, wherein the control mode comprises a rotation angle generated when the knob is rotated;
determining a brightness control function of the breathing lamp according to the control mode, wherein the brightness control function is related to the rotation angle of the control mode;
and controlling the brightness of the breathing lamp according to the brightness control function and the rotation angle.
In a second aspect, an embodiment of the present application provides a knob switch, including:
a knob and a breathing light;
one or more processors, and
a storage device communicatively coupled to the one or more processors, the storage device having one or more programs stored thereon that are executable by the one or more processors to enable the one or more processors to perform the method of any of the above.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer-executable program is stored, and when the computer-executable program is executed by a processor, the computer-readable storage medium causes the computer to perform any one of the methods described above.
In each embodiment of the invention, the control mode of the knob is obtained, and the brightness control function of the breathing lamp is determined according to the control mode, so that the brightness of the breathing lamp is controlled according to the brightness control function and the rotation angle of the control mode, and further, the user operation is associated with the brightness of the breathing lamp, so that the brightness of the breathing lamp is gradually changed in brightness along with the user operation, and the user experience is improved.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1a is a schematic structural diagram of a knob switch according to an embodiment of the present invention;
FIG. 1b is a block diagram of a knob switch according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a control method of a breathing lamp according to an embodiment of the present invention;
FIG. 3a is a schematic flow chart illustrating a method for controlling a breathing lamp according to another embodiment of the present invention;
FIG. 3b is a schematic diagram of a brightness gradient curve of a respiration lamp according to an embodiment of the present invention;
FIG. 3c is a graph illustrating a brightness gradient of a breathing lamp according to another embodiment of the present invention;
fig. 4a is a schematic flowchart of a control method of a breathing lamp according to an embodiment of the present invention;
FIG. 4b is a schematic diagram of a brightness gradient curve of a respiration lamp according to an embodiment of the present invention;
FIG. 4c is a graph illustrating a brightness gradient of a breathing lamp according to another embodiment of the present invention;
fig. 5a is a schematic flowchart of a control method of a breathing lamp according to an embodiment of the present invention;
FIG. 5b is a schematic diagram of a luminance gradient curve of a respiration lamp according to an embodiment of the present invention;
FIG. 5c is a graph illustrating a brightness gradient of a breathing lamp according to another embodiment of the present invention;
FIG. 5d is a graph illustrating a brightness gradient of a breathing lamp according to another embodiment of the present invention;
fig. 5e is a schematic diagram of a brightness gradient curve of another breathing lamp according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict. The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
The knob switch described in this embodiment may be used for any device that is controlled by a switch, for example, a lamp, and the knob switch controls the lamp to generate gradual change of brightness and/or color, and is also applicable to other devices that need to be turned on and off, and an application scenario of the knob switch is not specifically limited herein.
Referring to fig. 1a and 1b, which are schematic structural diagrams of a knob-type switch according to an embodiment of the present invention, a switch 100 includes a base 10, a knob 20, a breathing lamp 30 and a control board 40, wherein the knob 20 and the breathing lamp 30 are disposed on one end surface of the base 10, the other end surface of the base 10 is mounted on a wall surface or a to-be-mounted surface such as a controller, and the control board 40 is disposed in the base 10, and the control board 40 is electrically connected to the knob 20 and the breathing lamp 30, respectively. The knob 20 can rotate clockwise or counterclockwise relative to the end face of the base 10, and the control board 40 can control the breathing lamp 30 to perform brightness gradation according to the rotation of the knob 20. It should be noted that the gradual brightness change of the breathing lamp 30 in the embodiment of the present invention includes gradual brightness increase or gradual brightness decrease of the breathing lamp 30.
It should be noted that the shapes of the base 10, the knob 20 and the breathing lamp 30 and the relative positional relationship therebetween can be adjusted according to the needs of the user, and the structural schematic diagram of the knob switch shown in the present embodiment is only an exemplary illustration, and is not limited to the shapes and the relative positional relationship thereof.
The control panel 40 is used for acquiring the rotation angle of the knob 20 and controlling the breathing lamp 30 to realize gradual brightness change according to the rotation angle. Specifically, the control board 40 includes an angle sensor 41, a processor 42 and a storage device 43, wherein the processor 42 is electrically connected to the angle sensor 41 and the storage device 43, respectively, it should be noted that the number of the processors 42 may be one or more, and in the present embodiment, as shown in fig. 1b, one is taken as an example for description. In other embodiments, the angle sensor 41 may be replaced by an encoder or other component capable of collecting an angle or angle-related variable.
In one embodiment, the angle sensor 41 is mounted on the rotary knob 20 and rotates clockwise or counterclockwise together with the rotary knob 20, and the angle sensor 41 collects the real-time rotation angle of the rotary knob 20. In this embodiment, the rotation angle output by the angle sensor 41 is accumulated according to the rotation direction of the knob 20, and when the angle sensor 41 rotates clockwise with the knob 20, the rotation angle currently output by the angle sensor 41 increases progressively on the basis of the previous rotation angle; when the angle sensor 41 rotates counterclockwise with the knob 20, the rotation angle currently output by the angle sensor 41 is decreased on the basis of the previous rotation angle. For example, when the knob 20 has rotated clockwise and the rotation angle output by the angle sensor 41 is +60 degrees, if the knob 20 rotates counterclockwise and the rotated angle is 5 degrees, the rotation angle currently output by the angle sensor 41 is decreased on the basis of the previous rotation angle of +60 degrees, i.e., the rotation angle currently output by the angle sensor 41 is +55 degrees. For another example, when the knob 20 has been rotated clockwise and the rotation angle output by the angle sensor 41 is +60 degrees, if the knob 20 continues to rotate clockwise and the rotated angle is 5 degrees, the rotation angle currently output by the angle sensor 41 is incremented on the basis of the last rotation angle of +60 degrees, i.e. the rotation angle currently output by the angle sensor 41 is +65 degrees. It should be noted that, when the user operation includes multiple operations and the time interval between two adjacent operations is smaller than the preset time threshold, the rotation angle value output by the angle sensor 41 is an accumulated value, and in this embodiment, the multiple operations are referred to as a rotation operation; otherwise, the processor 42 regards the first rotation operation of the two adjacent operations as the end of the wheel rotation operation, and refers to the second rotation operation of the two adjacent operations as a new rotation operation. In the present embodiment, when it is determined that the user operation is finished, that is, when the user performs a new rotation operation, the rotation angle value output by the angle sensor 41 is cleared.
In the present embodiment, the angle sensor 41 sends the output rotation angle to the processor 42, and the processor 42 obtains the control mode of the knob 20 according to the rotation angle, wherein the control mode includes the rotation angle generated by the angle sensor 41 when the knob 20 is rotated. In some embodiments, processor 42 also determines the current rotational direction of knob 20 based on the current rotational angle and the last one or more rotational angles. For example, if the current rotation angle is increased from the previous rotation angle, the current rotation direction of the knob 20 is clockwise; if the current rotation angle is decreased from the previous rotation angle, the current rotation direction of the knob 20 is counterclockwise.
The processor 42 is connected to the angle sensor 41, on one hand, and is configured to receive the rotation angle output by the angle sensor 41, on the other hand, the processor 42 is further electrically connected to the breathing lamp 30, and the processor 42 controls the brightness gradient of the breathing lamp 30 according to the rotation angle output by the angle sensor 41.
The memory device 43 is communicatively coupled to the one or more processors 42, and the one or more programs stored on the memory device 43 are executable by the one or more processors 42 to enable the one or more processors to perform an embodiment of a method of controlling a breathing lamp as described in any of the embodiments below.
In the embodiment of the invention, the rotation angle of the knob is acquired by the angle sensor, so that the processor can control the breathing lamp to gradually change the brightness according to the rotation angle, the user operation is associated with the brightness of the breathing lamp, the brightness of the breathing lamp gradually changes the brightness along with the user operation, and the user experience is improved.
Referring to fig. 2, an embodiment of the present invention provides a method for controlling a breathing lamp, which is applied to the knob switch, where the knob switch includes a knob and the breathing lamp, and the method includes:
s21, acquiring a control mode of the knob;
the control mode refers to a control mode of the breathing lamp formed by operating a knob by a user, wherein the control mode comprises a rotation angle generated when the knob is rotated. It should be noted that the rotation angle output by the angle sensor is an angle rotated by the user through one or more continuous operations of the knob, wherein when the user performs multiple continuous operations, and the time interval between any two adjacent operations is smaller than a preset time threshold, the user can be regarded as one rotation operation.
The user operation knob can rotate clockwise or anticlockwise relative to the switch base, and when the operation knob rotates clockwise, the rotating angle is increased progressively on the basis of the rotating angle of the last output; when the direction of the operation knob is counterclockwise rotation, the rotation angle is decreased on the basis of the rotation angle of the last output.
In some embodiments, the difference between the currently output rotation angle and the last output rotation angle may be used to determine the rotation direction of the user operation knob. For example, the currently output rotation angle is +60 degrees, the last output rotation angle is +55 degrees, and the difference between the two rotation angles is +5 degrees, so that the current direction in which the user operates the knob is clockwise rotation of the knob. For another example, the currently output rotation angle is +60 degrees, the last output rotation angle is +65 degrees, and the difference between the two rotation angles is-5 degrees, so that the current direction in which the user operates the knob is to rotate the knob counterclockwise.
S23, determining a brightness control function of the breathing lamp according to the control mode, wherein the brightness control function is related to the rotation angle of the control mode;
the brightness control function is used for controlling the rule of brightness gradual change of the breathing lamp, wherein the brightness gradual change specifically refers to gradual brightness increase or gradual brightness decrease. In this embodiment, the brightness control of the breathing lamp is associated with the user operation, the user operation is specifically embodied as the direction and the rotation speed of the knob rotated by the user, the rotation speed is directly embodied as the change of the rotation angle, the faster the change of the rotation angle is, the faster the speed of controlling the brightness gradual change of the breathing lamp is, and conversely, the slower the change of the rotation angle is, the slower the speed of controlling the brightness gradual change of the breathing lamp is, so that the brightness change of the breathing lamp can follow the user operation, and the user experience is improved. For example, when the user slowly operates the knob, then the breathing lamp performs brightness gradation according to the slow operation speed of the user; when the user quickly operates the knob, then, the breathing lamp quickly changes the brightness gradually according to the operation speed of the user.
In some embodiments, the control mode further comprises a first operation and/or a second operation, wherein the first operation is for instructing to rotate the knob clockwise and the second operation is for instructing to rotate the knob counterclockwise. Then, step S23 includes:
s231, determining a brightness control function of the breathing lamp according to the rotation angle generated by the first operation and/or the second operation.
It will be appreciated that the user operation may be embodied to include only the first operation, only the second operation, or both the first and second operations. According to the characteristic that the angle sensor outputs the rotation angle value, when the knob rotates clockwise, the angle value which is sensed by the angle sensor to rotate is a positive value, and when the knob rotates anticlockwise, the angle value which is sensed by the angle sensor to rotate is a negative value, so that when the user operation includes the first operation and the second operation, and the time interval between the first operation and the second operation is less than the preset time threshold, the rotation angle output by the angle sensor represents the accumulated value of the rotation angle during the first operation and the rotation angle during the second operation which are sensed by the angle sensor. For example, if the knob is rotated by +60 degrees in the first operation and-30 degrees in the second operation, the final rotation angle according to the first operation and/or the second operation is +30 degrees. The angular change of the angle of rotation is then used to determine a brightness control function of the breathing lamp.
In this embodiment, the user operation is subdivided, and may be embodied as only including the first operation, only including the second operation, or including both the first operation and the second operation, and the rotation angle generated by the user operation is used to determine the brightness control function of the breathing lamp, so that the brightness control manner of the breathing lamp is enriched.
And S25, controlling the brightness of the breathing lamp according to the brightness control function and the rotation angle.
In the embodiment, the brightness control function is divided into a brightness gradually-increasing control function and a brightness gradually-decreasing control function according to the gradual brightness change of the breathing lamp, wherein the brightness gradually-increasing control function is used for controlling the brightness of the breathing lamp to gradually increase along with the increase of the rotation angle, and the brightness gradually-decreasing control function is used for controlling the brightness of the breathing lamp to gradually decrease until the lowest brightness of the breathing lamp.
In the embodiment of the invention, the control mode of the knob is obtained, the brightness control function of the breathing lamp is determined according to the control mode, so that the brightness of the breathing lamp is controlled according to the brightness control function and the rotation angle of the control mode, and further, the user operation is associated with the brightness of the breathing lamp, so that the brightness of the breathing lamp is gradually changed in brightness along with the user operation, and the user experience is improved.
Referring to fig. 3a, when the control mode includes the first operation, the determining the brightness control function of the breathing lamp according to the rotation angle generated by the first operation and/or the second operation includes:
s31, determining a gradually-lighting control function of the breathing lamp according to the first rotation angle;
the first rotation angle is generated during the first operation, and the fade-in control function is used for controlling the brightness of the breathing lamp to gradually increase along with the increase of the first rotation angle within a certain angle range.
The first operation is used for instructing the knob to rotate clockwise, and it can be understood that the brightness of the breathing lamp cannot rise infinitely, and an excessive working current burns out the breathing lamp to cause the breathing lamp to work normally, so in this embodiment, a first angle threshold is predefined, and when a first rotation angle of the knob is smaller than the first angle threshold, the brightness of the breathing lamp is controlled to gradually rise as the first rotation angle becomes larger; when the first rotation angle of the knob is equal to the first angle threshold value, the brightness of the breathing lamp reaches the maximum brightness; when the first rotation angle of the knob is larger than the first angle threshold, the brightness of the breathing lamp does not gradually rise along with the increase of the first rotation angle, and the brightness stays at the maximum brightness all the time. Preferably, the first angle threshold is 180 degrees. It should be noted that the first angle threshold may be customized according to the product requirement, and the numerical value of the first angle threshold is not specifically limited herein.
To improve the comfort of the user, in some embodiments, the fade-in control function is a sinusoidal function. Specifically, referring to fig. 3b, the brightness of the breathing lamp can be controlled to change with the rotation angle in unit time according to the following fade-in control function:
Figure BDA0002750982250000101
where ω is the rotation angular velocity (the rotation of the user is considered to be similar to a uniform rotation), LmaxIs the maximum brightness, L, of the breathing lamp0Brightness, T, of the breathing lamp at the beginning of said first operationdelThe preset delay time of the breathing lamp relative to the rotation action is greater than or equal to 0. In one embodiment, TdelSet to 0.5 s. In addition, L is0Greater than or equal to LminWhen the rotation angle of the knob is changed from 0 degree, L0=Lmin
As shown in FIG. 3b, the brightness of the breathing lamp reaches LmaxTime, i.e. t corresponding to the time axis1When the position is determined, if the first rotation angle is greater than or equal to the first angle threshold, the fade-up control function is:
f(t)=Lmax,t≥α1/ω+Tdel
wherein L ismaxIs the maximum brightness, alpha, of the breathing lamp1Is a predetermined first angle threshold, TdelA preset delay time for the breathing light relative to the rotational movement. At this time, the breathing lamp will not control the brightness of the breathing lamp to rise according to the user operation, but maintain the brightness of the breathing lamp at the maximum brightness.
In some embodiments, when the first operation ends, the method further comprises:
s33, acquiring a stop signal of the first operation, wherein the stop signal of the first operation is used for indicating that the clockwise rotation of the knob is stopped;
before the stop signal of the first operation is acquired, the processor continues to sample the first rotation angle according to a preset sampling rate, and if the first rotation angle is not sampled within a preset sampling time threshold value and is changed, the stop signal of the first operation is generated.
In the present embodiment, when the stop signal of the first operation is generated, the angle sensor is reset, and the first rotation angle output is set to 0 degrees.
S35, determining a first dimming control function of the breathing lamp according to the stop signal of the first operation;
wherein the first dimming control function is used for controlling the brightness of the breathing lamp to gradually decrease until the lowest brightness of the breathing lamp.
In some embodiments, the first dimming control function is a cosine function. Specifically, referring to fig. 3c, the brightness of the breathing lamp is controlled to gradually decrease according to the following first dimming control function:
Figure BDA0002750982250000111
wherein,
Figure BDA0002750982250000112
Lαfor the brightness of the breathing lamp at the time of receiving the stop signal of the second operation, TαIs the stop time of the second operation, TdimFor controlling the brightness of the breathing lamp from LmaxTo LminThe preset light-off time. In addition, L isαLess than or equal to LmaxWhen the rotation angle of the knob is greater than the angle threshold, Lα=Lmax。LminThe minimum brightness of the breathing lamp is generally not 0, because when the knob switch is connected to the circuit, the indicator lamp has a minimum brightness and is not completely dark, and only when the circuit is switched off, the indicator lamp is not powered on and is completely dark.
In the embodiment of the invention, the first rotation angle during the first operation of the user is associated with the dimming control function of the breathing lamp, and after the operation is stopped, the brightness of the breathing lamp is controlled to be gradually dimmed according to the dimming control function within the preset time, so that the brightness of the breathing lamp is gradually changed along with the operation of the user, and the brightness of the breathing lamp is controlled to be gradually dimmed after the operation of the user is finished, so that the brightness change occurs again along with the operation of the user next time, and the use experience of the user is improved.
In still other embodiments, when the control mode includes the second operation, referring to fig. 4a, the determining the brightness control function of the breathing lamp according to the rotation angle generated by the first operation and/or the second operation includes:
s41, linearly adjusting the brightness of the breathing lamp to the highest brightness within a preset lamp-on time;
and S42, determining a second dimming control function of the breathing lamp according to the second rotation angle.
The second rotation angle is generated during the second operation, and the second dimming control function is used for controlling the brightness of the breathing lamp to gradually decrease as the second rotation angle becomes larger (where larger means that the absolute value of the second rotation angle becomes larger) until the lowest brightness of the breathing lamp.
In some embodiments, the second dimming control function is a cosine function, and in particular, referring to fig. 4b, the brightness of the breathing lamp is controlled to gradually decrease according to the following second dimming control function:
Figure BDA0002750982250000121
where ω is a rotational angular velocity of the second operation, LmaxIs the maximum brightness, L, of the breathing lampminIs the minimum brightness, T, of the breathing lampdelThe delay time of the breathing lamp relative to the rotation action is preset.
Please refer to FIG. 4b, when the brightness of the breathing lamp reaches LminAt this time, if the second rotation angle is greater than or equal to a second angle threshold, the second dimming control function of the breathing lamp is:
Figure BDA0002750982250000122
wherein alpha is2The second angle threshold is preset. At this time, the breathing lamp will not control the brightness of the breathing lamp to decrease according to the user operation, but maintain the brightness of the breathing lamp at the minimum brightness. In the present embodiment, the method for calculating the rotation angle output from the angle sensor described above is used to calculate the rotation angleThe second rotation angle is obtained when rotating counterclockwise, and the rotation angle of the angle sensor output is decreased on the basis of the previous rotation angle at the counterclockwise rotation, so that the value of the second rotation angle is a negative value. Then, the second rotation angle being greater than or equal to a second angle threshold means that the absolute value of the second rotation angle is greater than or equal to the second angle threshold.
It should be noted that, in the present embodiment, the first angle threshold and the second angle threshold may be set to the same angle value, such as 180 degrees.
In still other embodiments, when the second operation is stopped and the brightness of the breathing lamp does not reach a minimum brightness, the method further comprises:
s43, acquiring a stop signal of the second operation, wherein the stop signal is used for indicating that the knob stops rotating anticlockwise;
the processor continues to sample the second rotation angle according to a preset sampling rate before obtaining the stop signal of the second operation, which is the same as the stop signal of the first operation, and generates the stop signal of the second operation if the second rotation angle is not sampled to be changed within a preset sampling time threshold.
In the present embodiment, when the stop signal of the second operation is generated, the angle sensor is reset, and the second rotation angle output is set to 0 degrees.
And S44, determining a first dimming control function of the breathing lamp according to the stop signal of the second operation, wherein the first dimming control function is used for controlling the brightness of the breathing lamp to gradually decrease.
Specifically, please refer to the brightness change of the breathing lamp shown in fig. 4c, during the second operation of the user, the brightness of the breathing lamp is controlled to gradually decrease according to the second dimming control function until the stop signal of the second operation is obtained; when a stop signal of a second operation is acquired, the brightness of the breathing lamp is controlled to gradually decrease until the lowest brightness of the breathing lamp according to a first dimming control function.
In some embodiments, the first dimming control function is a cosine function. Specifically, referring to fig. 3c, the brightness of the breathing lamp is controlled to gradually decrease according to the following first dimming control function:
Figure BDA0002750982250000131
wherein,
Figure BDA0002750982250000132
Lαfor the brightness of the breathing lamp at the time of receiving the stop signal of the second operation, TαTime of the second operation, TdimFor controlling the brightness of the breathing lamp from LmaxTo LminThe preset light-off time. In addition, L isαLess than or equal to LmaxWhen the rotation angle of the knob is greater than the angle threshold, Lα=Lmax
In the embodiment of the invention, the second rotation angle during the second operation of the user is associated with the dimming control function of the breathing lamp, so that the brightness gradient of the breathing lamp is changed along with the change of the operation of the user.
When the control mode includes at least one first operation and at least one second operation, or includes at least two first operations, or includes at least two second operations, in this embodiment, when the time interval between any two adjacent operations is greater than or equal to the preset time interval threshold, then the two operations are defined as two independent and unrelated rotation operations, and the breathing lamp controls the brightness gradient of the breathing lamp according to the first rotation operation and the second rotation operation respectively; and when the time interval between any two adjacent operations is smaller than a preset time interval threshold value, regarding the operations as the same rotation operation.
Thus, in some embodiments, referring to fig. 5a, when a time interval between two adjacent operations is smaller than a preset time interval threshold, the determining the brightness control function of the breathing lamp according to the rotation angle generated by the first operation and/or the second operation includes:
s51, acquiring a rotation angle generated in the (N + 1) th operation;
s52, determining a brightness control function of the breathing lamp according to the rotation angle generated in the (N + 1) th operation, so as to control the brightness of the breathing lamp in the time interval of the (N + 1) th operation and the (N + 2) th operation, wherein N is an integer greater than or equal to 0.
It can be understood that when the required rotation angle is large, the user may not rotate the breathing lamp to the position at one time, a slight pause may occur in the rotation process, and the brightness control function controls the brightness change of the breathing lamp according to the change of the rotation angle, however, in the time interval between the N +1 operation and the N +2 operation, the brightness of the breathing lamp is kept unchanged in the time interval because the rotation angle is not changed. In order to maintain the continuity of the brightness change of the breathing lamp, the brightness curve of the breathing lamp is interpolated in the time interval, so that the brightness change of the breathing lamp has continuity.
Specifically, when the control mode includes at least one first operation and at least one second operation, and the (N + 1) th operation is the first operation, the (N + 2) th operation is the second operation, and the time interval between the (N + 1) th operation and the (N + 2) th operation is smaller than the preset time interval threshold, please refer to the brightness change of the breathing lamp shown in fig. 5b, and the brightness of the breathing lamp gradually becomes brighter as the rotation angle increases during the (N + 1) th operation of the user; at the N +2 th operation of the user, the brightness of the user gradually becomes dark along with the decreasing of the rotation angle; and in the time interval of delta t between the (N + 1) th operation and the (N + 2) th operation, controlling the brightness of the breathing lamp to continuously keep the gradual-lighting change according to the gradual-lighting control function corresponding to the (N + 1) th operation, so that the brightness change of the breathing lamp has continuity.
When the control mode includes at least one first operation and at least one second operation, and the (N + 1) th operation is the second operation, the (N + 2) th operation is the first operation, and the time interval between the (N + 1) th operation and the (N + 2) th operation is smaller than the preset time interval threshold, please refer to the brightness change of the breathing lamp shown in fig. 5c, and the brightness of the breathing lamp gradually becomes dark as the rotation angle decreases during the (N + 1) th operation of the user; when the user operates the (N + 2) th time, the brightness of the user gradually becomes brighter along with the increment of the rotation angle; and in the time interval of delta t between the (N + 1) th operation and the (N + 2) th operation, controlling the brightness of the breathing lamp to continuously keep the gradual dimming change according to the corresponding gradual dimming control function in the (N + 1) th operation.
When the control mode includes at least two first operations, then, the (N + 1) th operation and the (N + 2) th operation are both the first operations, and the time interval between the (N + 1) th operation and the (N + 2) th operation is smaller than the preset time interval threshold, please refer to the brightness change of the breathing lamp shown in fig. 5d, and the brightness of the breathing lamp gradually becomes bright along with the increment of the rotation angle when the (N + 1) th operation and the (N + 2) th operation of the user are both performed; and controlling the brightness of the breathing lamp to continuously keep the gradual-lighting change according to the gradual-lighting control function corresponding to the (N + 1) th operation within the time interval of delta t of the (N + 1) th operation and the (N + 2) th operation.
When the control mode includes at least two second operations, then, the (N + 1) th operation and the (N + 2) th operation are both the second operations, and the time interval between the (N + 1) th operation and the (N + 2) th operation is smaller than the preset time interval threshold, please refer to the brightness change of the breathing lamp shown in fig. 5e, and the brightness of the breathing lamp gradually becomes dark as the rotation angle decreases during the (N + 1) th operation and the (N + 2) th operation of the user; and in the time interval of delta t between the (N + 1) th operation and the (N + 2) th operation, controlling the brightness of the breathing lamp to continuously keep the gradual dimming change according to the corresponding gradual dimming control function in the (N + 1) th operation.
In this embodiment, the preset time interval threshold is set to 600ms, but the preset time interval value may be set to any other value.
In the embodiment of the invention, when the control mode comprises at least one first operation and/or at least one second operation and the time interval between two adjacent operations is smaller than the preset time interval threshold, interpolation is performed according to the brightness control function corresponding to the previous operation in the time interval between two adjacent operations, so that the brightness of the breathing lamp does not generate stagnation or sudden change in the gradual change process, and the stability of the brightness gradual change of the breathing lamp is ensured.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned control method for a breathing lamp, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here. The computer-readable storage medium may be a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
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.

Claims (17)

1. A control method of a breathing lamp is applied to a knob type switch, the knob type switch comprises a knob and the breathing lamp, and the method is characterized by comprising the following steps:
acquiring a control mode of the knob, wherein the control mode comprises a rotation angle generated when the knob is rotated;
determining a brightness control function of the breathing lamp according to the control mode, wherein the brightness control function is related to the rotation angle of the control mode;
and controlling the brightness of the breathing lamp according to the brightness control function and the rotation angle.
2. The method of claim 1, wherein the control mode further comprises a first operation and/or a second operation, wherein the first operation is indicative of clockwise rotation of the knob and the second operation is indicative of counterclockwise rotation of the knob;
determining a brightness control function of the breathing lamp according to the control mode, comprising:
and determining a brightness control function of the breathing lamp according to the rotation angle generated by the first operation and/or the second operation.
3. The method of claim 2, wherein determining the brightness control function of the breathing lamp based on the rotation angle generated by the first operation and/or the second operation when the control mode includes the first operation comprises:
and determining a gradually-lighting control function of the breathing lamp according to a first rotation angle, wherein the first rotation angle is generated during the first operation, and the gradually-lighting control function is used for controlling the brightness of the breathing lamp to gradually rise along with the increase of the first rotation angle within a certain angle range.
4. The method of claim 3, further comprising:
acquiring a stop signal of the first operation, wherein the stop signal is used for indicating that the clockwise rotation of the knob is stopped;
and determining a first dimming control function of the breathing lamp according to the stop signal of the first operation, wherein the first dimming control function is used for controlling the brightness of the breathing lamp to gradually decrease until the lowest brightness of the breathing lamp.
5. The method of claim 4, wherein prior to said obtaining a stop signal for said first operation, said method further comprises:
sampling the first rotation angle according to a preset sampling rate;
and if the first rotating angle acquired within a preset sampling time threshold value is not changed, generating a stop signal of the first operation.
6. A method according to any of claims 3 to 5, wherein the fade-in control function is a sinusoidal function.
7. The method of claim 6, wherein the fade-up control function is:
Figure FDA0002750982240000021
where ω is the rotational angular velocity, LmaxIs the maximum brightness, L, of the breathing lamp0Brightness, T, of the breathing lamp at the beginning of said first operationdelFor a predetermined delay of the breathing lamp relative to the rotary movementAnd (3) removing the solvent.
8. The method of claim 7, wherein when the first rotation angle is greater than or equal to a first angle threshold, then the fade-in control function is:
f(t)=Lmax,t≥α1/ω+Tdel
wherein L ismaxIs the maximum brightness, alpha, of the breathing lamp1Is a predetermined first angle threshold, TdelA preset delay time for the breathing light relative to the rotational movement.
9. The method of claim 2, wherein determining the brightness control function of the breathing lamp based on the rotation angle generated by the first operation and/or the second operation when the control mode includes the second operation comprises:
linearly adjusting the brightness of the breathing lamp to the highest brightness within a preset lamp-on time;
and determining a second dimming control function of the breathing lamp according to a second rotation angle, wherein the second rotation angle is generated during the second operation, and the second dimming control function is used for controlling the brightness of the breathing lamp to gradually decrease along with the increase of the second rotation angle until the lowest brightness of the breathing lamp.
10. The method of claim 9, further comprising:
acquiring a stop signal of the second operation, wherein the stop signal is used for indicating that the knob stops rotating anticlockwise;
and determining a first dimming control function of the breathing lamp according to the stop signal of the second operation, wherein the first dimming control function is used for controlling the brightness of the breathing lamp to gradually decrease.
11. The method of claim 10, wherein the first dimming control function and the second dimming control function are both cosine functions.
12. The method of claim 11, wherein the second dimming control function is:
Figure FDA0002750982240000031
where ω is a rotational angular velocity of the second operation, LmaxIs the maximum brightness, L, of the breathing lampminIs the minimum brightness, T, of the breathing lampdelThe delay time of the breathing lamp relative to the rotation action is preset.
13. The method of claim 12, wherein when the second angle of rotation is greater than or equal to a second angle threshold, the second dimming control function of the breathing lamp is:
g2(t)=Lmin
Figure FDA0002750982240000041
wherein alpha is2The second angle threshold is preset.
14. The method of any of claims 10-13, wherein the first dimming control function is:
Figure FDA0002750982240000042
wherein,
Figure FDA0002750982240000043
Lαfor the brightness of the breathing lamp at the time of receiving the stop signal of the second operation, TαIs the time of the second operation, TdimFor controlling the brightness of the breathing lampLmaxTo LminThe preset light-off time.
15. The method according to claim 2, wherein when the control mode comprises at least one first operation and at least one second operation, or comprises at least two first operations, or comprises at least two second operations, and a time interval between two adjacent operations is less than a preset time interval threshold, the determining the brightness control function of the breathing lamp according to the rotation angle generated by the first operation and/or the second operation comprises:
acquiring a rotation angle generated in the (N + 1) th operation;
and determining a brightness control function of the breathing lamp according to the rotation angle generated in the (N + 1) th operation, so as to control the brightness of the breathing lamp in the time interval of the (N + 1) th operation and the (N + 2) th operation, wherein N is an integer greater than or equal to 0.
16. A knob switch, comprising:
knob and breathing lamp, and
a control panel, the control panel comprising:
the angle sensor is used for acquiring the rotation angle of the knob;
one or more processors, and
a storage device communicatively coupled to the one or more processors, the storage device having one or more programs stored thereon that are executable by the one or more processors to enable the one or more processors to perform the method of any of claims 1-15.
17. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer-executable program which, when executed by a processor, causes the computer to perform the method of any one of claims 1-15.
CN202011184103.XA 2020-10-29 2020-10-29 Breathing lamp control method, knob type switch and storage medium Active CN114430600B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011184103.XA CN114430600B (en) 2020-10-29 2020-10-29 Breathing lamp control method, knob type switch and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011184103.XA CN114430600B (en) 2020-10-29 2020-10-29 Breathing lamp control method, knob type switch and storage medium

Publications (2)

Publication Number Publication Date
CN114430600A true CN114430600A (en) 2022-05-03
CN114430600B CN114430600B (en) 2024-04-12

Family

ID=81310420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011184103.XA Active CN114430600B (en) 2020-10-29 2020-10-29 Breathing lamp control method, knob type switch and storage medium

Country Status (1)

Country Link
CN (1) CN114430600B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116528437A (en) * 2023-07-03 2023-08-01 珠海数字动力科技股份有限公司 Intelligent lighting networking linkage control method for indoor parking lot
CN117389453A (en) * 2023-09-22 2024-01-12 深圳好博窗控技术股份有限公司 Electric lifting window panel interaction method and device, computer equipment and medium
CN117389453B (en) * 2023-09-22 2024-07-30 深圳好博窗控技术股份有限公司 Electric lifting window panel interaction method and device, computer equipment and medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BE731743A (en) * 1968-04-19 1969-10-01
US4859922A (en) * 1986-02-18 1989-08-22 Robert Bosch Gmbh System for controlling the operating mode of a controlled apparatus
CN1802065A (en) * 2006-01-23 2006-07-12 北京飞天诚信科技有限公司 Respiration lamp controlling method and its device
WO2015184485A1 (en) * 2014-06-03 2015-12-10 Hendon Semiconductors Pty Ltd An off/on and brightness adjustment control arrangement for a phase cutting control dimmer and a method of operation thereof
CN105369550A (en) * 2014-08-26 2016-03-02 佛山海尔滚筒洗衣机有限公司 Washing machine with breathing lamp group and control method thereof
KR20180026161A (en) * 2016-09-02 2018-03-12 조상현 Lighting control apparatus, and control method thereof
KR20180027250A (en) * 2016-09-06 2018-03-14 조상현 Desk lamp with easy brightness control
CN108386734A (en) * 2018-02-27 2018-08-10 北京小米移动软件有限公司 Lamps and lanterns
CN208569444U (en) * 2015-12-31 2019-03-01 Abb环球工业和服务私人有限公司 For controlling the control device of multiple electric devices
CN110486702A (en) * 2019-09-20 2019-11-22 深圳伯图康卓物联科技有限公司 A kind of knob light modulation intelligent switch
CN110865680A (en) * 2019-12-18 2020-03-06 深圳市必显科技有限公司 Multifunctional magnetic adsorption type knob
CN210607170U (en) * 2019-07-18 2020-05-22 广州日顺电子科技有限公司 Dimming panel
CN210950859U (en) * 2019-12-23 2020-07-07 江苏紫米电子技术有限公司 Mobile lighting device

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BE731743A (en) * 1968-04-19 1969-10-01
US4859922A (en) * 1986-02-18 1989-08-22 Robert Bosch Gmbh System for controlling the operating mode of a controlled apparatus
CN1802065A (en) * 2006-01-23 2006-07-12 北京飞天诚信科技有限公司 Respiration lamp controlling method and its device
WO2015184485A1 (en) * 2014-06-03 2015-12-10 Hendon Semiconductors Pty Ltd An off/on and brightness adjustment control arrangement for a phase cutting control dimmer and a method of operation thereof
CN105369550A (en) * 2014-08-26 2016-03-02 佛山海尔滚筒洗衣机有限公司 Washing machine with breathing lamp group and control method thereof
CN208569444U (en) * 2015-12-31 2019-03-01 Abb环球工业和服务私人有限公司 For controlling the control device of multiple electric devices
KR20180026161A (en) * 2016-09-02 2018-03-12 조상현 Lighting control apparatus, and control method thereof
KR20180027250A (en) * 2016-09-06 2018-03-14 조상현 Desk lamp with easy brightness control
CN108386734A (en) * 2018-02-27 2018-08-10 北京小米移动软件有限公司 Lamps and lanterns
CN210607170U (en) * 2019-07-18 2020-05-22 广州日顺电子科技有限公司 Dimming panel
CN110486702A (en) * 2019-09-20 2019-11-22 深圳伯图康卓物联科技有限公司 A kind of knob light modulation intelligent switch
CN110865680A (en) * 2019-12-18 2020-03-06 深圳市必显科技有限公司 Multifunctional magnetic adsorption type knob
CN210950859U (en) * 2019-12-23 2020-07-07 江苏紫米电子技术有限公司 Mobile lighting device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴俊杰等: "从调光台灯到角度传感器的标定", 《中国信息技术教育》, no. 19 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116528437A (en) * 2023-07-03 2023-08-01 珠海数字动力科技股份有限公司 Intelligent lighting networking linkage control method for indoor parking lot
CN116528437B (en) * 2023-07-03 2023-09-22 珠海数字动力科技股份有限公司 Intelligent lighting networking linkage control method for indoor parking lot
CN117389453A (en) * 2023-09-22 2024-01-12 深圳好博窗控技术股份有限公司 Electric lifting window panel interaction method and device, computer equipment and medium
CN117389453B (en) * 2023-09-22 2024-07-30 深圳好博窗控技术股份有限公司 Electric lifting window panel interaction method and device, computer equipment and medium

Also Published As

Publication number Publication date
CN114430600B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
CN108954706B (en) Control method of air conditioner, air conditioner and storage medium
CN108105963B (en) Control method of indoor fan of air conditioner, air conditioner and storage medium
CN107763812B (en) Air conditioner control method, air conditioner and computer readable storage medium
CN111397078B (en) Parameter adjusting method and device and electrical equipment
CN104515256B (en) control method and device of air conditioner
CN114430600A (en) Control method of breathing lamp, knob type switch and storage medium
EP3553400B1 (en) Air conditioner adjusting method and device, and storage medium
CN114623587A (en) Control method and device of air conditioner, air conditioner and storage medium
CN111645493A (en) Parking air conditioner and control method and device thereof
CN111179867A (en) Screen brightness control method
CN114488880B (en) Intelligent control method and device of equipment, intelligent switch and storage medium
CN109612033B (en) Control method of air conditioner, air conditioner and computer readable storage medium
CN108964538A (en) Motor control system and method for digitally controlling motor speed
CN107575989B (en) Air conditioner wire controller, air conditioner system and air conditioner dehumidification control method
CN113709302A (en) Brightness adjusting method and system for light-emitting equipment
CN109634149B (en) Control method, system, equipment and storage medium for frequency converter of wire drawing machine
CN110848919A (en) Fan control method and device, main control board and electrical equipment
CN111457541A (en) Self-cleaning method of air conditioner, air conditioner and readable storage medium
CN107763809B (en) Energy-saving temperature control method for air conditioner, air conditioner and storage medium
CN107763813B (en) Energy-saving temperature control method for air conditioner, air conditioner and storage medium
CN111854086A (en) Control method and device of variable frequency air conditioner and variable frequency air conditioner
CN112888120B (en) Method and device for adjusting color temperature of lamp and computer readable storage medium
CN103869965B (en) A kind of control method, device and a kind of electronic equipment
US11221593B2 (en) Correction control method of hidden switch with fuzzy inference system
CN112443949B (en) Control method and control device of air conditioner and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant