You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.6 KiB
62 lines
1.6 KiB
5 years ago
|
# LED-Wavepool
|
||
8 years ago
|
|
||
8 years ago
|
The `WavepoolEffect` plugin makes waves of light splash out from each keypress.
|
||
|
When idle, it will also simulate gentle rainfall on the keyboard.
|
||
8 years ago
|
|
||
|
## Using the plugin
|
||
|
|
||
|
To use the plugin, one needs to include the header and select the effect.
|
||
|
|
||
|
```c++
|
||
|
#include <Kaleidoscope.h>
|
||
6 years ago
|
#include <Kaleidoscope-LEDControl.h>
|
||
8 years ago
|
#include <Kaleidoscope-LED-Wavepool.h>
|
||
8 years ago
|
|
||
6 years ago
|
KALEIDOSCOPE_INIT_PLUGINS(LEDControl, WavepoolEffect);
|
||
8 years ago
|
|
||
6 years ago
|
void setup (){
|
||
8 years ago
|
Kaleidoscope.setup();
|
||
|
|
||
8 years ago
|
WavepoolEffect.idle_timeout = 5000; // 5 seconds
|
||
8 years ago
|
WavepoolEffect.activate();
|
||
8 years ago
|
}
|
||
|
```
|
||
|
|
||
6 years ago
|
It is recommended to place the activation of the plugin as early as possible, so
|
||
|
the plugin can catch all relevant key presses.
|
||
8 years ago
|
|
||
6 years ago
|
## Plugin properties
|
||
8 years ago
|
|
||
8 years ago
|
The plugin provides the `WavepoolEffect` object, which has the following
|
||
8 years ago
|
properties:
|
||
|
|
||
8 years ago
|
### `.idle_timeout`
|
||
|
|
||
|
> When to keys are being pressed, light will periodically splash across
|
||
|
> the keyboard. This value sets the delay in ms before that starts.
|
||
|
>
|
||
|
> To disable the idle animation entirely, set this to 0.
|
||
|
>
|
||
|
> Default is 5000 (5 seconds).
|
||
|
|
||
6 years ago
|
### `.ripple_hue`
|
||
|
|
||
|
> The Hue of the ripple animation. If set, the light splashing across the
|
||
|
> keyboard will use this value instead of all colors of the rainbow.
|
||
|
>
|
||
4 years ago
|
> Setting it to the special value of `WavepoolEffect.rainbow_hue` will cause the
|
||
6 years ago
|
> plugin to use all colors again.
|
||
|
>
|
||
4 years ago
|
> Defaults to `WavepoolEffect.rainbow_hue`.
|
||
6 years ago
|
|
||
8 years ago
|
## Dependencies
|
||
|
|
||
6 years ago
|
* [Kaleidoscope-LEDControl](LEDControl.md)
|
||
8 years ago
|
|
||
|
## Further reading
|
||
|
|
||
|
Starting from the [example][plugin:example] is the recommended way of getting
|
||
|
started with the plugin.
|
||
|
|
||
4 years ago
|
[plugin:example]: /examples/LEDS/LED-Wavepool/LED-Wavepool.ino
|