Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature-request for setRGB(r,g,b); #23

Open
s-light opened this issue Nov 29, 2023 · 0 comments
Open

feature-request for setRGB(r,g,b); #23

s-light opened this issue Nov 29, 2023 · 0 comments

Comments

@s-light
Copy link

s-light commented Nov 29, 2023

  • 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant