Advertisement
alseambusher

Untitled

Sep 30th, 2024
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1.     void final_0(String color, int duration)
  2.     {
  3.         int delay_ms = 50; // ms
  4.         int delay_0_ms = 10; // ms
  5.         unsigned long timer = millis();
  6.  
  7.         CRGB parsed_color = get_color(color);
  8.         while (millis() - timer < duration)
  9.         {
  10.             for (int j = 0; j < NUM_LEDS; j++)
  11.             {
  12.                 leds[j] = parsed_color;
  13.                 FastLED.show();
  14.                 delay(delay_0_ms);
  15.             }
  16.             turn_off_leds();
  17.             delay(delay_ms);
  18.         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement