Go Down

Topic: "semplice" LED fade con TLC5940 (Read 297 times) previous topic - next topic

imho

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: [Select]

//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.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy