|
Post by otherside92 on Dec 11, 2019 14:25:08 GMT
Hi,
I have recently acquired one of the older generations of blync light (BLYNCUSB10: device type 0x01).
The API reference manual includes information about how to set it to different colours (TurnOnRedLight, TurnOnBlueLight, etc), however it says that flashing is not supported.
However via the EmbravaConnect software I can make my blync light flash, so how is this achieved?
Thanks.
|
|
|
Post by Senthil on Dec 17, 2019 9:14:25 GMT
Hi,
To flash the red light on this legacy light
Create a thread, in the ThreadProc method, use a while loop and Call the TurnOnRedLight and ResetLight functions. Below the sample code for that.
bool bExitFlash = false; Thread thFlashing = new Thread(new ThreadStart(StartFlashing)); thFlashing.Start();
void StartFlashing() { While (!bExitFlash) { TurnOnRedLight();
Thread.Sleep(500); // Wait 500 ms
ResetLight();
Thread.Sleep(500) // Wait 500 ms } }
|
|