Go Down

Topic: [SOLVED] Arduino Uno & TLC5940 (Read 2554 times) previous topic - next topic

Fexduino

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: [Select]
if (counter == 3)
  {
    counter = 0;
  }
  else
  {
    counter = counter + 1;
  }


Which I would write like this:

Code: [Select]

counter = ++counter % 3;


Probably not more efficient but it is cleaner :)

Go Up