Noiasca Tool Kit
Several helper functions and classes to make life with Arduino easier
|
#include <Noiasca_led.h>
Inherits LedBase< T >.
Public Member Functions | |
void | off () override |
switch output off More... | |
void | on (bool force=false) |
switch on More... | |
void | offForced () |
** More... | |
brightness_t | getCurrentBrightness () |
get the current brightness More... | |
void | setCurrentBrightness (brightness_t brightness) |
set the current brightness More... | |
void | setMaxBrightness (brightness_t maxBrightness) |
set the maximum brightness More... | |
void | setOnInterval (uint16_t newInterval) |
set on interval More... | |
void | setOffInterval (uint16_t newInterval) |
set off interval More... | |
void | toggle () override |
switch between on or off state More... | |
void | update (uint32_t currentMillis=millis()) |
check if update is necessary More... | |
void | setInterval (uint16_t _interval0, uint16_t _interval1) |
set on/off times More... | |
void | setInterval (uint16_t _interval0, uint16_t _interval1, uint16_t _interval2, uint16_t _interval3) |
set on/off times More... | |
void | setInterval (uint16_t _interval0, uint16_t _interval1, uint16_t _interval2, uint16_t _interval3, uint16_t _interval4, uint16_t _interval5) |
set on/off times More... | |
void | setInterval (uint16_t _interval0, uint16_t _interval1, uint16_t _interval2, uint16_t _interval3, uint16_t _interval4, uint16_t _interval5, uint16_t _interval6, uint16_t _interval7) |
set on/off times More... | |
void | setModeOnOff () |
activate OnOff mode More... | |
void | setModeBlink () |
activate Blink mode More... | |
void | setModeFlicker () |
activate Flicker mode | |
void | setModeFluorescent () |
activate Fluorescent mode More... | |
void | setModeHeartbeat () |
activate Heartbeat mode More... | |
void | setModePulse () |
activate Pulse mode More... | |
void | setModeRhythm () |
activate Rhythm mode More... | |
void | setModeSmooth () |
activate Smooth mode More... | |
void | blink (uint32_t currentMillis) |
"run" function for blink effect More... | |
void | flicker (uint32_t currentMillis=millis()) |
"run" function for flicker effect More... | |
void | fluorescent (uint32_t currentMillis=millis()) |
check if update is necessary More... | |
void | heartbeat (uint32_t currentMillis=millis()) |
check if update is necessary More... | |
void | pulse (uint32_t currentMillis=millis()) |
check if update for pulse is necessary More... | |
void | rhythm (uint32_t currentMillis=millis()) |
check if update is necessary More... | |
void | smooth (uint32_t currentMillis=millis()) |
check if update is necessary More... | |
Effect LED.
A class with different effects for one LED. Uses a unified hw interface
|
inlineoverride |
switch output off
Switch the effect to off state.
|
inline |
switch on
If effect is off, switch the output on.
force | set to true if new state must be forced to the first ON state. set to false if only the OFF state should be switched ON (default). |
|
inline |
**
force switch off
switches off imidiatly without smooth effect
|
inline |
get the current brightness
The current brightness/level of this output
|
inline |
set the current brightness
The current brightness/level of this output
|
inline |
set the maximum brightness
The output will dimm up to this maximum level.
maxBrightness | the maximum brigthness (upper end of range) [0..255] |
|
inline |
set on interval
Set a new interval / time for how long the LED should be on.
newInterval | new interval in milliseconds |
|
inline |
set off interval
Set a new interval / time for how long the LED should be off.
newInterval | new interval in milliseconds |
|
inlineoverride |
switch between on or off state
If the LED is on - switch it off. If the LED is off - switch it on.
|
inline |
check if update is necessary
This is the "run" function. Call this function in loop() to make the effect visible. This run function calls the necessary effect updates
currentMillis | you can handover a millis timestamp |
|
inline |
set on/off times
Set the on and off interval.
_interval0 | the on interval |
_interval1 | the off interval |
|
inline |
set on/off times
Set the on and off interval.
_interval0 | the on interval |
_interval1 | the off interval |
_interval2 | the on interval |
_interval3 | the off interval |
|
inline |
set on/off times
Set the on and off interval.
_interval0 | the on interval |
_interval1 | the off interval |
_interval2 | the on interval |
_interval3 | the off interval |
_interval4 | the on interval |
_interval5 | the off interval |
|
inline |
set on/off times
Set the on and off interval.
_interval0 | the on interval |
_interval1 | the off interval |
_interval2 | the on interval |
_interval3 | the off interval |
_interval4 | the on interval |
_interval5 | the off interval |
_interval6 | the on interval |
_interval7 | the off interval |
|
inline |
activate OnOff mode
a simple on off output
|
inline |
activate Blink mode
sets also the default intervals
|
inline |
activate Fluorescent mode
sets also the default intervals
|
inline |
activate Heartbeat mode
sets also the default intervals
|
inline |
activate Pulse mode
sets also the default intervals
|
inline |
|
inline |
activate Smooth mode
sets also the default intervals
|
inline |
"run" function for blink effect
This is the "run" function. Call this function in loop() to make the effect visible.
currentMillis | you can handover a millis timestamp |
|
inline |
"run" function for flicker effect
This is the "run" function. Call this function in loop() to make the effect visible.
currentMillis | you can handover a millis timestamp |
|
inline |
check if update is necessary
This is the "run" function. Call this function in loop() to make the effect visible.
currentMillis | you can handover a millis timestamp |
|
inline |
check if update is necessary
This is the "run" function. Call this function in loop() to make the effect visible.
currentMillis | you can handover a millis timestamp |
|
inline |
check if update for pulse is necessary
This is the "run" function. Call this function in loop() to make the effect visible.
currentMillis | you can handover a millis timestamp |
|
inline |
check if update is necessary
This is the "run" function. Call this function in loop() to make the effect visible.
currentMillis | you can handover a millis timestamp |
|
inline |
check if update is necessary
This is the "run" function. Call this function in loop() to make the effect visible.
currentMillis | you can handover a millis timestamp |