For my examination I need a light, which I can flash for min. 40 ms. I can still control the light. The Light has 20 channels with different LEDs. I can control the channel (1-20, integer), the intensity (0-1000, integer) and the time for how long the LEDS should flash onetime (40-.... milliseconds).
Actually I solved it with the Sleep function:
channelID = 5;
intens = 1000;
time = 50 //milliseconds
led->setChannelIntensity(channelID, intens);
Sleep(time);
led->setChannelIntensity(channelID, 0);
That works, but it is too vague. There is a deviation from +/- 5 percent. How can I implement a solution, where the flash-time is always the same? I heard about Timer-Events, but I don't know how to do that. My programming knowledge is very bad. May be you can help me and you have a code example for me?
Thank you so much!!!