Initial Commit
This commit is contained in:
20
include/Utilities.h
Normal file
20
include/Utilities.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef UTILITIES
|
||||
#define UTILITIES
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <FastLED.h>
|
||||
|
||||
class Utilities {
|
||||
public:
|
||||
static void setRange(CRGB* leds, uint16_t start, uint16_t end, CRGB color) {
|
||||
for(uint16_t i = start; i < end; i++) {
|
||||
leds[i] = color;
|
||||
}
|
||||
}
|
||||
|
||||
static void setAll(CRGB* leds, uint16_t numLEDs, CRGB color) {
|
||||
setRange(leds, 0, numLEDs, color);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user