So I'm running an installation with a Teensy 3.5 controlling 10 TLC59711 LED drivers.
I've been wanting to implement some gamma correction for the LEDs (as described in this article by Adafruit https://learn.adafruit.com/led-tricks-gamma-correction/the-quick-fix). And used the processing sketch they distribute to generate a table for 16-bit LED gamma correction. The generated table seems fine but implementing seems a little odd. The LEDs are flickering and Serial.print also confirms odd values (even above the ones that are IN the array). The table is set in PROGREM memory, as Adafruit recommends in their article.
Hope someone can help me figure out why this is happening, and how to fix it
Code is available on Github to give a little more context, as the whole is a little to much to post here.
https://github.com/RobbertGroenendijk/echo_1
I've been wanting to implement some gamma correction for the LEDs (as described in this article by Adafruit https://learn.adafruit.com/led-tricks-gamma-correction/the-quick-fix). And used the processing sketch they distribute to generate a table for 16-bit LED gamma correction. The generated table seems fine but implementing seems a little odd. The LEDs are flickering and Serial.print also confirms odd values (even above the ones that are IN the array). The table is set in PROGREM memory, as Adafruit recommends in their article.
Hope someone can help me figure out why this is happening, and how to fix it
Code is available on Github to give a little more context, as the whole is a little to much to post here.
https://github.com/RobbertGroenendijk/echo_1
Code:
for (int i = 0; i < NUM_LIGHTS; i++) {
lightArray[i].loop();
tlc.setPWM(i,int(&gamma16[int(lightArray[i].brightness)])); // GAMMA CORRECTION
}