Control method of lamp
First Claim
Patent Images
1. A control method of a lamp, comprising:
- whether a touch event occurs in a control device is determined;
obtaining a coordinate of a touch point if the touch event occurs;
whether the touch point occurs in a color control area of a Graphical User Interface (GUI) of the control device is determined;
responding to a color temperature set and a brightness set from the control device, generating a first pulse width modulation (PWM) and a second PWM;
whether the lamp connects with the control device is determined;
package the first PWM and the second PWM in a color control package;
opening a transmission thread, comprising;
whether the value of a transmission flag is equal to 1 is determined;
transmitting the color control package to the lamp by wireless technology if the value of the transmission flag is equal to 1;
setting the value of a responding flag to 0; and
whether the value of the responding flag is set to 0 within a time interval is determined;
opening a receiving thread, comprising;
whether a lamp package from the lamp is received is determined;
whether the lamp package is a responding package is determined if the lamp package from the lamp is received;
setting the value of the responding package to 1 and the value of the transmission flag to 0 if the lamp package is the responding package;
1 Assignment
0 Petitions
Accused Products
Abstract
The control method comprises the following steps. Firstly, whether a touch event occurs in a control device is determined. Then, responding to a color temperature set and a brightness set from the control device, a first PWM and a second PWM is generated. Then, whether the lamp connects with to the control device is determined. Then, the first PWM and the second PWM is packaged in a color control package if the lamp connects with to the control device. Then, the color control package is transmitted to the lamp in wireless.
-
Citations
11 Claims
-
1. A control method of a lamp, comprising:
-
whether a touch event occurs in a control device is determined; obtaining a coordinate of a touch point if the touch event occurs; whether the touch point occurs in a color control area of a Graphical User Interface (GUI) of the control device is determined; responding to a color temperature set and a brightness set from the control device, generating a first pulse width modulation (PWM) and a second PWM; whether the lamp connects with the control device is determined; package the first PWM and the second PWM in a color control package; opening a transmission thread, comprising; whether the value of a transmission flag is equal to 1 is determined; transmitting the color control package to the lamp by wireless technology if the value of the transmission flag is equal to 1; setting the value of a responding flag to 0; and whether the value of the responding flag is set to 0 within a time interval is determined; opening a receiving thread, comprising; whether a lamp package from the lamp is received is determined; whether the lamp package is a responding package is determined if the lamp package from the lamp is received; setting the value of the responding package to 1 and the value of the transmission flag to 0 if the lamp package is the responding package; - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
Specification