Pages: 1 [2]   Go Down
Author Topic: [SOLVED] Arduino Uno & TLC5940  (Read 1211 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I assume it just needs the time after the init call. You should definitely check out the init() method of the TLC library to investigate what it is doing in there. Seems strange though that it needs a ms in the setup only, good find though.

I noticed this:
Code:
if (counter == 3)
  {
    counter = 0;
  }
  else
  {
    counter = counter + 1;
  }

Which I would write like this:

Code:
counter = ++counter % 3;

Probably not more efficient but it is cleaner smiley
Logged

Pages: 1 [2]   Go Up
Jump to: