error tlc5940 and arduino

hi guys

i am new to electronics and programming so i am working on a light that has a lot of leds. i have got the hardware done but my code doesn’t work >:( :x :x this is just some test code to see if everything is working but the code is holding me up!!!

here it is…

#include <Tlc5940.h>


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

void loop()
{

Tlc.set(0, 4095);
Tlc.set(1, 4095);
Tlc.set(2, 4095);
Tlc.set(3, 4095);
Tlc.set(4, 4095);
Tlc.update();
}

and these are my errors…

sketch_apr02a.ino: In function ‘void setup()’:

sketch_apr02a:7: error: ‘Tlc’ was not declared in this scope

sketch_apr02a.ino: In function ‘void loop()’:

sketch_apr02a:13: error: ‘Tlc’ was not declared in this scope

I do not know the Tlc5940 library, but from the error message, it seems like you need to declare and instantiate tlc as an object before you call Tlc.init().

For example, when you want to use a servo motor, you have to include the library servo.h

#include <Servo.h>

Then you have to declare a global variable of the type “Servo.”

Servo servo_1;

Once you have declared your variable, you can call its methods as below.

void setup()

{

servo_1.attach(1);

}

O/P posted 3 months ago.

Hasn’t been back since.

Deaf ears…

Yes, I saw the date after I pressed reply. I like to offer a reply to someone on a forum if I ask a question, and this looked like an easy one that didn’t have any replies. Oh well…