Closed StarterCraft closed 3 years ago
You need make sure only to call led.Blink(360,360)
once. In your example, it will be called over and over again, resetting the effect again and again. In your code e.g. you could do:
bool _st = false;
void loop() {
if (someCondition && !_st) {
_st = true;
led.Blink(360, 360).Forever();
}
led.Update();
}
Thank you! It works! :>
If I try writing code without dynamic LED effect switching like it's written below, it works normally:
But if I want to switch the LED's effect at the runtime according to a condition, nothing happens, the LED just ignores the instructions:
How do I get rid of this problem?