Noiasca Tool Kit
Several helper functions and classes to make life with Arduino easier
|
show a specific rhythm. More...
#include <Noiasca_led.h>
Inherits LedBase< T >.
Public Member Functions | |
Rhythm (T &obj) | |
blink a specific rhythm 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 | off () override |
switch output off More... | |
void | toggle () |
switch between on or off state | |
void | update (uint32_t currentMillis=millis()) |
check if update is necessary More... | |
show a specific rhythm.
blinks a LED in a specific rhythm. Supports 1, 2 and 4 pairs of on/off times. This can be used for police cars, ambulances and similar vehicles. default sequence is ECE2 (150, 60, 20, 270). But you can set any other sequence also (ECE1, HELLA 3, HELLA 4,...)
blink a specific rhythm
obj | the object to connect |
|
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 |
|
inlineoverride |
switch output off
Switch the output to off state.
|
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 |