Created NeoPixelBrightnessBus object (markdown)

Michael Miller
2016-12-11 15:53:06 -08:00
parent f526e3ab59
commit 08508cae76

@@ -0,0 +1,14 @@
See [NeoPixeBus object](https://github.com/Makuna/NeoPixelBus/wiki/NeoPixelBus-object) for more details on the general use of this object.
See [NeoPixelBrightnessBus object API Reference](https://github.com/Makuna/NeoPixelBus/wiki/NeoPixelBrightnessBus-object-API) for more details on the methods exposed.
This object differs from the normal NeoPixelBus by supporting a strip wide brightness feature. This brightness allows one place to set and query a general brightness of the entire strip. When the brightness is changed, all pixels will be modified and any new colors being set will be modified.
But this feature does come at a cost of sketch size and memory use. So if you don't need it; use the normal NeoPixelBus object instead.
Just like the normal NeoPixelObject, it must be constructed with a ["feature"](https://github.com/Makuna/NeoPixelBus/wiki/NeoPixelBus-object#neo-features) and a ["method"](https://github.com/Makuna/NeoPixelBus/wiki/NeoPixelBus-object#neo-methods) object that define which pixels you are using and how they are updated.
```
NeoPixelBrightnessBus<NeoGrbFeature, Neo800KbpsMethod> strip(pixelCount, pixelPin);
```
Be warned, using the brightness feature can cause unwanted effects. These include:
* Colors returned by `GetPixelColor()` are not the same ones set by calling `SetPixelColor()`
* Subsequent calls to `SetBrightness()` may cause the colors to loose nuances and quantize. They may even go grey or completely black.