Hi,
I am having troubles making a 2 Colour LED fade at full brigtness..
i am thinking its something to do with arduino having 1023 vs TLC having 4095 pwm levels?!
I have a arduino with ntc 10k thermal sensor and it controls lighting...
I had added some code to compare the real full brightness and appear to be half.
I am in the process of converting my code from MOSFET/Arduino to TLC.
at the moment the setColorVGA / redVGA, blueVGA are the parts of code in question.
cheers.
if (tempVGA < COLDTEMP) tempVGA = COLDTEMP;
if (tempVGA > HOTTEMP) tempVGA = HOTTEMP;
redVGA = map(tempVGA, COLDTEMP, HOTTEMP, 255, 0); // reverse 0, 255 for resistance use
blueVGA = map(tempVGA, COLDTEMP, HOTTEMP, 0, 255);
void setColorVGA(int redVGA, int green, int blueVGA) {
#ifdef COMMON_ANODE
redVGA = 255 - redVGA;
blueVGA = 255 - blueVGA;
#endif
// analogWrite(ledVGAR, redVGA);
// analogWrite(ledVGAB, blueVGA);
Tlc.set(1, redVGA);
Tlc.update();//actually executes the pin states programmed above
Tlc.set(2, blueVGA);
Tlc.update();//actually executes the pin states programmed above
TLC code.txt (35.7 KB)
TLCthermal_led_relays_lights_demos_changed_LED1BR-15-02-2018.ino (34.8 KB)