Pages: [1]   Go Down
Author Topic: "semplice" LED fade con TLC5940  (Read 223 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 42
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ciao a tutti,
volevo far "respirare" un led con il TLC5940, magari con una pausa di 1 sec.
In questo caso ottengo un unico "respiro", non riesco quindi ad ottenere un ciclo continuo.

Vi posto il codice:

Code:
//Tlc_addFade (channel, startValue, endValue, startMillis, endMillis)
//channel: the LED you want to fade
//startValue: the output value at the start of the fade
//endValue: the output value at the end of the fade
//startMillis: when to start the fade (based on the Arduino's millis() value)
//endFade : when to end the fade


#include "Tlc5940.h" //led driver
#include "tlc_fades.h"

void setup ()
{
Tlc.init ();

tlc_addFade(0, 0, 500, 0000, 1000); tlc_addFade(0, 500, 0, 2000, 4000);
 

}

void loop ()
{
 

Tlc.update();

tlc_updateFades();
}

Grazie a tutti.
Logged

Pages: [1]   Go Up
Jump to: