Noiasca Tool Kit
Several helper functions and classes to make life with Arduino easier
|
Bounce 5 LEDs between left and right. More...
#include <Noiasca_led.h>
Public Member Functions | |
Bounce5 (T &obj) | |
Bounce 5 LEDs between left and right. More... | |
void | begin () |
start hardware More... | |
void | setOnStateChange (Callback funcPtr) |
set the callback function onStateChange More... | |
void | on () |
switch output on More... | |
void | off () |
switch output off More... | |
void | toggle () |
switch between on or off state | |
void | update (uint32_t currentMillis=millis()) |
check if update is necessary More... | |
Bounce 5 LEDs between left and right.
running lights like a KITT/Larson Scanner states are: 0 off; 1 run and on, 2 run but off
doesn't inherit from LedBase
Bounce 5 LEDs between left and right.
obj | a object with 5 LEDs |
|
inline |
start hardware
Will do the necessary steps to initialize the hardware pins. Call this function in your setup().
|
inline |
set the callback function onStateChange
a callback function receives state changes from the car traffic light
funcPtr | the callback function |
|
inline |
switch output on
Switch the output to on state.
|
inline |
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 |