-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
-
Arduino board: Adafruit ESP32-S3 Reverse TFT Feather
-
Arduino IDE version
Version: 2.2.1
Date: 2023-08-31T14:16:33.536Z
CLI Version: 0.34.0
Copyright © 2023 Arduino SA
simple featurerequest:
add some helper functions for faster / easier setting to all leds at once:
void setRGB(uint16_t idx, uint16_t r, uint16_t g, uint16_t b);
void setRGB(uint16_t r = 0, uint16_t g = 0, uint16_t b = 0);void Adafruit_TLC59711::setRGB(uint16_t idx, uint16_t r, uint16_t g, uint16_t b) {
setLED(idx, r, g, b);
}
void Adafruit_TLC59711::setRGB(uint16_t r, uint16_t g, uint16_t b) {
for (uint16_t i=0, n=4*numTlc; i<n; i++)
setRGB(i, r, g, b);
}this way you could easily set leds - all with the same function name:
// all LEDs at once to off
tlc.setRGB();
// all LEDs at once to green
tlc.setRGB(0, 2000, 0);
// classic just on led
tlc.setRGB(0, 42, 420);would a pr with these additions be accepted?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels