Hello!
I have a very big project that needs to be done soon and i have encountered a massive issue and I need help!
I am using 2 TLC5940's to drive 32 LED's and it is wired up like this except the resistors.
I have a 470 ohm resistor on the IREF instead of the 2.2k pull up like i'm supposed to, those are still on order.
the other resistor i don't have.
http://tlc5940arduino.googlecode.com/svn/wiki/images/breadboard-arduino-tlc5940.png
Next is the link to my video
MUTE YOUR SPEAKERS!! (I didn't know my camera recorded audio, yay!)
That was a more stable run, although sometimes they'll blink a few times on the off right away, then stop.
So here is my code, I don't think that the code is making it do it, I think it is something to do with how its setup.
#include "Tlc5940.h"
#include "tlc_fades.h"
TLC_CHANNEL_TYPE channel;
void setup()
{
Tlc.init();
}
void loop()
{
int channelOne = random(15);
int channelTwo = random(15);
int channelThree = random(15);
int channel = 0;
int maxValue = 4095;
if (channelOne == channelTwo || channelThree)
{
channelTwo = random(15);
channelThree = random(15);
}
if(channelTwo == channelThree)
{
channelThree = random(15);
}
if (tlc_fadeBufferSize < TLC_FADE_BUFFER_LENGTH - 2) {
if (!tlc_isFading(channel)) {
uint32_t startMillisOne = millis();
uint32_t endMillisOne = millis() + 10000;
uint32_t startMillisTwo = millis() + 5000;
uint32_t endMillisTwo = millis() + 15000;
uint32_t startMillisThree = millis() + 7500;
uint32_t endMillisThree = millis() + 17500;
tlc_addFade(channelOne, 0, maxValue, startMillisOne, endMillisOne);
tlc_addFade(channelOne, maxValue, 0, endMillisOne, startMillisOne);
tlc_addFade(channelTwo, 0, maxValue, startMillisTwo, endMillisTwo);
tlc_addFade(channelTwo, maxValue, 0, endMillisTwo, startMillisTwo);
tlc_addFade(channelThree, 0, maxValue, startMillisThree, endMillisThree);
tlc_addFade(channelThree, maxValue, 0, endMillisThree, startMillisThree);
}
}
tlc_updateFades();
}