I have a sketch that has been working just fine then today I get
“TLC_12_Ch_Basic_Setup.ino:11:21: error: Tlc5940.h: No such file or directory” error on verify…WTF?
Win7 Arduino 1.0.5, It was working yesterday…
Other programs are working just fine that don’t use the #include. Did Win7 decide that it knew what I wanted? Is this a PATH issue?
Going crazy
/*
- +5V from Arduino -> (VCC and DCPRG)
- GND from Arduino -> (GND and VPRG)
- digital 3 -> (GSCLK)
- digital 9 -> (XLAT)
- digital 10 -> (BLANK)
- digital 11 -> (SIN)
- digital 13 -> (SCLK)
*/
#include "Tlc5940.h"
void setup()
{
/* Call Tlc.init() to setup the tlc.
You can optionally pass an initial PWM value (0 - 4095) for all channels.*/
Tlc.init();
}
/* This loop will create a Knight Rider-like effect if you have LEDs plugged
into all the TLC outputs. NUM_TLCS is defined in "tlc_config.h" in the
library folder. After editing tlc_config.h for your setup, delete the
Tlc5940.o file to save the changes. */
void loop()
{
int direction = 1;
for (int channel = 0; channel < NUM_TLCS * 12; channel += direction) {
/* Tlc.clear() sets all the grayscale values to zero, but does not send
them to the TLCs. To actually send the data, call Tlc.update() */
Tlc.clear();
/* Tlc.set(channel (0-15), value (0-4095)) sets the grayscale value for
one channel (15 is OUT15 on the first TLC, if multiple TLCs are daisy-
chained, then channel = 16 would be OUT0 of the second TLC, etc.).
value goes from off (0) to always on (4095).
Like Tlc.clear(), this function only sets up the data, Tlc.update()
will send the data. */
if (channel == 0) {
direction = 1;
} else {
Tlc.set(channel - 1, 4095);
}
Tlc.set(channel, 4095);
if (channel != NUM_TLCS * 12 - 1) {
Tlc.set(channel + 1, 4095);
} else {
direction = -1;
}
/* Tlc.update() sends the data to the TLCs. This is when the LEDs will
actually change. */
Tlc.update();
delay(25);
}
}