-
Notifications
You must be signed in to change notification settings - Fork 0
setNow()
Arnd edited this page Jan 31, 2021
·
1 revision
The normal The set() command will queue subsequent calls if there is still an active fade; this function causes any queued commands to be discarded and the current command to be interrupted and replaced with the values specified.
...
...
smoothLED Board;
...
...
Serial.print(F("BOARD LED: "));
if (Board.begin(LED_BUILTIN)) // Start the "Board" instance on pin 13
Serial.println(F("OK"));
else
Serial.println(F("ERROR!"));
Board.set(0); // set to OFF
Board.set(255,10000); // Slowly brighten the LED over 10 seconds
delay(2000);
Boad.setnow(0); // interrupt the brighten command and immediately turn off LED
...
...