Pages: [1]   Go Down
Author Topic: LED Driver (TLC5940) EASY problem...  (Read 402 times)
0 Members and 1 Guest are viewing this topic.
Sioux Falls
Offline Offline
Jr. Member
**
Karma: 0
Posts: 77
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK folks, all I want to do is blink 1 led from a TLC5940 for 1 second on, 1 second off ( eventually doing it with 16 ) .... why is this not working????
Code:

#include "Tlc5940.h"

void setup()
{
  Tlc.init();
}


void loop()
  {
    Tlc.clear();
      {
         Tlc.set(9,2000);
         delay(1000);
         Tlc.set(9,30);
         delay(1000);
      }
 
   Tlc.update();
 
}

Thanks,


Nick
Logged

Sioux Falls
Offline Offline
Jr. Member
**
Karma: 0
Posts: 77
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

p.s...... what is happing is it is only performing the last command it sees, so it only lights led on pin 9 to a setting of 30, but holds it on at 30 forever... WTF
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25804
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I'm no expert, but it looks like you're only doing the update after setting the LED to 30.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Sioux Falls
Offline Offline
Jr. Member
**
Karma: 0
Posts: 77
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Love you AWOL
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Take a look at my prior post on lessons learned with 5940.
Logged

Pages: [1]   Go Up
Jump to: