esp-wemos-schild/Readme.md

102 lines
2.9 KiB
Markdown
Raw Permalink Normal View History

2017-02-19 20:43:23 +00:00
Homie Schild Firmware
=====================
## About
## Features
2017-02-19 20:50:24 +00:00
### LED Strip
2017-02-19 20:43:23 +00:00
|Topic |Descriptions |settable |Values |
|---------|--------------|:---------:|---------|
2017-02-19 20:50:24 +00:00
|`device_id`/strip/pixel/|Range property from 0 - (number of pixels - 1)|yes|Color as uint32_t see [Color](#color)|
|`device_id`/strip/color|Range property to set the effects colors 1 & 2 see: [effect colors](#effect-colors)|yes|Color as uint32_t see [Color](#color)|
|`device_id`/strip/brightness|Sets the brightness of the pixel strip|yes|possible values: 0 - 255|
|`device_id`/strip/effect|Set effect|yes|see: [effects](#effects)|
|`device_id`/strip/clear|Clears the pixels strip|yes|any value is possible|
|`device_id`/strip/length|Set the strip length|yes|Possible values: 0 - length|
2017-02-19 20:43:23 +00:00
## Color
To convert RGB value use the following bash code:
2017-02-19 21:03:19 +00:00
```shell
2017-02-19 20:43:23 +00:00
function rgbToColor {
echo $(( $(($1<<16)) + $(($2<<8)) + $(($3)) ));
2017-03-02 19:41:34 +00:00
}
2017-02-19 20:43:23 +00:00
function colorToRGB {
echo "Red: $(($1>>16&0xff))"
echo "Green: $(($1>>8&0xff))"
echo "Blue: $(($1&0xff))"
}
2017-02-19 21:03:19 +00:00
2017-02-19 20:43:23 +00:00
```
#### Example
RGB Value to color uint32_t
2017-02-19 21:03:19 +00:00
```shell
2017-02-19 20:43:23 +00:00
bash$ rgbToColor 155 230 32
10216992
bash$
```
uint32_t to RGB values
2017-02-19 21:03:19 +00:00
```shell
2017-02-19 20:43:23 +00:00
bash$ colorToRGB 10216992
Red: 155
Green: 230
Blue: 32
bash$
```
## Effects
2017-02-19 20:57:11 +00:00
* **scanner**
2017-02-19 20:43:23 +00:00
Shows the moving larson scanner eye known form *Battlestar Galactica* and *Knight Rider*. The used effect color can be specified by *color_0*
2017-02-19 20:57:11 +00:00
* **randomscanner**
2017-02-19 20:43:23 +00:00
This is the same scanner then the scanner above but uses an alternating color pattern
2017-02-19 20:57:11 +00:00
* **rainbowcycle**
2017-02-19 20:43:23 +00:00
Shows a cycling rainbown on the LED strip
2017-02-19 20:57:11 +00:00
* **theaterchase**
2017-02-19 20:43:23 +00:00
Shows an color chasing LED strip.
You can specify the color by set *color_0* and *color_1*
* **bvb**
Shows an color chasing LED strip.
It is predefined with yellow and black (off)
2017-02-19 20:57:11 +00:00
* **fade**
2017-02-19 20:43:23 +00:00
Fades from effect color_0 to effect_color_1
2017-02-19 20:57:11 +00:00
* **randomfade**
2017-02-19 20:43:23 +00:00
Fades thru an alternating color pattern
* **random**
Set the color of each pixel randomly, once
* **smooth**
Smooth transitions, created for pixelprojektor
* **plasma**
Plasma animation, created for pixelprojektor
* **fire**
Yellow-Orange-red flicker fire effect
* **fireworks**
(Beta) Works best on very long stripes, this one is a bit short (30 LEDs)
* **drop**
Water drop effect
* **scannerrandom**
Like randomscanner, but randomly changes directions
* **ring**
Water drop effect with expanding "ring"
2017-02-19 21:03:19 +00:00
* **none**
2017-02-19 20:43:23 +00:00
Stop all effects
## Effect colors
You can set to different effect colors
* *color_0* (default R: 255, G: 0 B: 0)
* *color_1* (default R: 0, G: 0 B: 255)
The effect color has to be set after the effect.
###### Example:
1. `homie/device_id/strip/effect/set -m "fade"`
2. `homie/device_id/strip/color_0/set -m "255"`
3. `homie/device_id/strip/color_1/set -m "10216992"`
##### color_0
This color will be used for the following effects:
2017-02-19 20:57:11 +00:00
* *scanner*
* *theaterchase*
* *fade*
2017-02-19 20:43:23 +00:00
##### color_1
This color will be used for the following effects:
2017-02-19 20:57:11 +00:00
* *theaterchase*
* *fade*