Guys... im a bit lost here...
Im building a small led tree, using TLC5940 and RGB leds
im trying to fade 16 rgb leds at the same time, at the beginning only the blue pins...
when i ran the fade example. it all works ok. But then i try to fade all the blue pins (or, red, green, dosent matter wich), i just only fade the first 12 ones...
here is my code:
#include "Tlc5940.h"
#include "tlc_fades.h"
int pinR[16] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
int pinG[16] = {1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46};
int pinB[16] = {2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47};
int i = 0;
void setup()
{
Tlc.init();
}
void loop(){
if (!tlc_isFading(pinB[0])) {
uint16_t duration = 3000;
int maxValue = 4095;
uint32_t startMillis = millis() + 50;
uint32_t endMillis = startMillis + duration;
for(int a =0; a < 16; a++){
tlc_addFade(pinB[a], 0, maxValue, startMillis, endMillis);
tlc_addFade(pinB[a], maxValue, 0, endMillis, endMillis + duration);
}
}
tlc_updateFades();
}
im using the library Tlc5940_r014.zip Latest Stable Build as of May 7th, 2009
thanks for the help!