Initial Home page

Michael Miller
2016-02-22 19:56:28 -08:00
commit 081abdfefc

87
Home.md Normal file

@@ -0,0 +1,87 @@
_**(please excuse the mess, this Wiki is still under construction)**_
# Overview
This is an Arduino Library that supports sending out data to update a series of color smart LEDs commonly known as NeoPixels. This Wiki is for V2 of the library only, which replaces all previous different versions and branches.
## Supported Platforms
## Supported Pixels
# API
## NeoPixelBus object
This object will be used to set colors on the pixels. When constructed a "feature" and a "method" object must be supplied to define which pixels you are using and how they are updated.
### Color Size and Order Features
These "feature" objects will be used to define what color order is used for the pixels and what color size (rgb, or rgbw).
Currently there are only a few sizes and color formats. If there is demand, support for others can easily be requested by creating an issue on GitHub.
#### NeoGrb
A three element color in the order of Green, Red, and then Blue. The most common three element formats.
#### NeoRgbw
A four element color in the order of Red, Green, Blue, and then White. The most common four element formats.
#### NeoRgb
A three element color in the order of Red, Green, and then Blue.
#### NeoBrg
A three element color in the order of blue, Red, and then Green.
### Methods
These platform methods will define "how" the pixels are updated. While primarily used to define how fast the data is sent out to support older pixels; for the Esp8266 it also defines the several methods required based on different form factors due to pin restrictions and exposed pins on the boards.
Currently there are only AVR and Esp8266 methods available. If there is demand, support for AVR or other Arduino platforms can be requested.
#### NeoAvr800KbpsMethod
The NeoAvr800KbpsMethod is the standard one to use with most Arduino boards. This works with all Atmel AVR chip. This work is directly taken from AdaFruit's NeoPixel library and all credit should go to them.
#### NeoAvr400KbpsMethod
Same as NeoAvr800KbpsMethod but running at the older and slower data rate. This work is directly taken from AdaFruit's NeoPixel library and all credit should go to them.
#### NeoEsp8266Dma800KbpsMethod
The NeoEsp8266Dma800KbpsMethod only supports the RDX0/GPIO3 pin. The Pin value passed into the constructor is ignored.
This method uses very little CPU for actually sending the data to NeoPixels but it requires an extra buffer for the DMA to read from.
Thus there is a trade off of CPU use versus memory use. The extra buffer needed is four times the size of the primary pixel buffer.
It also requires the use of the RDX0/GPIO3 pin which is not exposed on the ESP-01.
Thanks to g3gg0.de for porting the initial DMA support from the original. The original was located at https://github.com/cnlohr/esp8266ws2812i2s. It has been modified dramatically since those originals but credit is due.
#### NeoEsp8266Dma400KbpsMethod
Same as NeoEsp8266Dma800KbpsMethod but running at the older and slower data rate.
#### NeoEsp8266Uart800KbpsMethod
NeoEsp8266Uart800KbpsMethod only supports the TXD1/GPIO2 pin. The Pin value passed into the constructor is ignored.
This method uses the CPU to manage a small hardware managed UART buffer to send the data to the NeoPixels. Thus it requires more CPU overhead than the Dma method but does NOT require an extra buffer. Its main benefit is that it is usable on ESP-01.
#### NeoEsp8266Uart400KbpsMethod
Same as NeoEsp8266Uart800KbpsMethod but running at the older and slower data rate.
#### NeoEsp8266BitBang800KbpsMethod
NeoEsp8266BitBang800KbpsMethod supports any available pin between 0 and 15.
This method uses only the CPU to send data to the NeoPixels. But due to WiFi interrupts is not stable when used with WiFi features of the Esp8266.
It is not recommended to use this method except for comparing results with the other methods.
#### NeoEsp8266BitBang400KbpsMethod
Same as NeoEsp8266BitBang800KbpsMethod but running at the older and slower data rate.
### Color objects
There are several color objects that can be used to define and blend colors. While all can be directly used to set the pixel color, the RgbwColor can only be used with a NeoPixelBus that has been declared with NeoRgbw feature.
#### RgbColor object
This represents a color as RGB model and exposes useful methods to manipulate colors. This is the native color used and is the most efficient.
The color components are Red, Green, and Blue.
#### RgbwColor object
This represents a color as RGBW model and exposes useful methods to manipulate colors. This is the native color used and is the most efficient.
The color components are Red, Green, Blue, and White.
This can only be used with NeoPixelBus that was declared with a four element color feature like NeoRgbw.
#### HslColor object
This represents a color as HSL model and exposes useful methods to manipulate colors. While not the native color used, the extra overhead will be offset by intuitive color components and effects.
The color components are Hue, Saturation, and Lightness, in the range of 0.0 to 1.0.
To darken the color, just reduce the L property and to brighten the color, just increase the L property.
To randomly pick a color, just randomly pick a Hue and leave Saturation and Lightness the same.
## NeoPixelAnimator object
(still under development)
This manages the animations for a single NeoPixelBus. All time values are by default in milliseconds but can be changed by the timeScale argument on the constructor.
NOTE: NeoPixelBus::Show() must still be called to push the color state to the physical NeoPixels.