Hello everyone, I'm new to the arduino world. I have desided to try to build an led matrix useing the TLC5940 led driver. We are working very small scale to start with but heres my issue with useing the tlc5940 lib.
I want to be able to turn on several leds at a time with having to call them one by one in the code. here is what i have so far but it does not work correctly as in the code it turns on led 0 1 2 5 10 15 when all i wanted was to turn on led 0, 5, 10, 15
this code is partial to the whole code i have which just as a bunch of these statements which dont work lol.
EDIT: we are starting off with 1 tlc and 16 single leds, next step will be 3 tlc and 16 RGB leds
#include "Tlc5940.h"
void setup() {
Tlc.init();
}
void setLED(int level, ... )
{
va_list leds;
int ledNumber = -1;
va_start(leds, level);
while((ledNumber = va_arg(leds, int)) != -1)
{
Tlc.set(ledNumber, level);
}
va_end(leds);
}
void loop() {
setLED(4095, 0, 5, 10, 15);
Tlc.update();
delay(550);
}
any and all help is appreciated