From 08508cae76f03ade8b676f2b696860c2192869ff Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sun, 11 Dec 2016 15:53:06 -0800 Subject: [PATCH] Created NeoPixelBrightnessBus object (markdown) --- NeoPixelBrightnessBus-object.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 NeoPixelBrightnessBus-object.md diff --git a/NeoPixelBrightnessBus-object.md b/NeoPixelBrightnessBus-object.md new file mode 100644 index 0000000..86466c7 --- /dev/null +++ b/NeoPixelBrightnessBus-object.md @@ -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 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.