Blinkstick nano stops working


#1

Hi,

im using four blinkstick nanos on four PCs, and two of them are losing connect usually in a day (both using windows 7). Then i have to unplug and plug it back like 3times(the first two times im getting “device not recognized” errors from windows). In the last two weeks ive tested the code and the sticks on 6different PCs and all worked seamlessly except those two. Since that two PCs are not mine i cant really inspect them during “stagework” so i cant provide error logs, i only know that theyre working well, then after hours theyre just not blinking the next time an event is happening(the owners of the PCs told me) Ive already read this topic:
topic
, and try all the steps but without success. Here is my code, its dotnet and its really-really simple:

BlinkStick device = BlinkStick.FindFirst ();
if (device != null && device.OpenDevice ()) {
for (int i = 0; i < 5 ; i++)
{
device.Pulse((byte)255, (byte)20, (byte)30);
Thread.Sleep(1000);
}
for (int i = 0; i < 5 ; i++)
{
device.Blink((byte)255, (byte)20, (byte)30);
Thread.Sleep(1000);
}
for (int i = 0; i < 5 ; i++)
{
device.Blink((byte)255, (byte)20, (byte)30);
}
}

Any idea what could the problem be? Thanks in advance :slight_smile:


#2

There is no delay of at least 20 ms in your last loop.
Add a thread.sleep(20);


#3

Thank you, i will definitely try it!