11 #if defined(ARDUINO) && ARDUINO >= 100 22 #ifndef FADE_LED_MAX_LED 23 #define FADE_LED_MAX_LED 6 33 #ifndef FADE_LED_RESOLUTION 34 #define FADE_LED_RESOLUTION 255 175 void setTime(
unsigned long time,
bool constTime =
false);
bool falling()
Returns if the led is still fading down.
Definition: FadeLed.cpp:74
void updateThis()
Updates fading of this object only.
Definition: FadeLed.cpp:82
Main class of the FadeLed-library.
Definition: FadeLed.h:44
FadeLed(byte pin)
Constructor of a FadeLed object.
Definition: FadeLed.cpp:9
void on()
Fade to max brightness.
Definition: FadeLed.cpp:52
byte _startVal
The brightness at which the new fade needs to start.
Definition: FadeLed.h:246
unsigned long _count
The number of _interval's passed.
Definition: FadeLed.h:250
static void setInterval(unsigned int interval)
Sets the interval at which to update the fading.
Definition: FadeLed.cpp:152
byte _setVal
The brightness to which last set to fade to.
Definition: FadeLed.h:245
#define FADE_LED_MAX_LED
Maximum number of FadeLed objects.
Definition: FadeLed.h:23
void off()
Fade to off.
Definition: FadeLed.cpp:56
void setTime(unsigned long time, bool constTime=false)
Set the time a (full) fade will take.
Definition: FadeLed.cpp:64
static unsigned int _interval
Interval (in ms) between updates.
Definition: FadeLed.h:265
static FadeLed * _ledList[FADE_LED_MAX_LED]
array of pointers to all FadeLed objects
Definition: FadeLed.h:263
void begin(byte val)
Set a direct begin value to start at without fade.
Definition: FadeLed.cpp:20
static unsigned int _millisLast
Last time all FadeLed objects where updated.
Definition: FadeLed.h:266
byte _pin
PWM pin to control.
Definition: FadeLed.h:244
bool _constTime
Constant time fade or just constant speed fade.
Definition: FadeLed.h:248
unsigned long _countMax
The number of _interval's a fade should take.
Definition: FadeLed.h:249
static byte _ledCount
Next number of FadeLed object.
Definition: FadeLed.h:264
bool done()
Returns if the led is done fading.
Definition: FadeLed.cpp:48
bool rising()
Returns if the led is still fading up.
Definition: FadeLed.cpp:70
void stop()
Stops the current fading.
Definition: FadeLed.cpp:78
static void update()
Updates all FadeLed objects.
Definition: FadeLed.cpp:156
void beginOn()
Sets the start brightness directly to full.
Definition: FadeLed.cpp:60
byte _curVal
Current brightness.
Definition: FadeLed.h:247
byte getCurrent()
Returns the current brightness.
Definition: FadeLed.cpp:44