Updated NeoPixelBus object (markdown)

Michael Miller
2016-02-25 15:05:27 -08:00
parent 7c6e68e4e1
commit 1e8103e31b

@@ -4,9 +4,9 @@ This object will be used to set colors on the pixels. When constructed, a "featu
```
NeoPixelBus<FEATURE, METHOD> strip(pixelCount, pixelPin);
```
Below is an example to create one for the AVR platform. It will manage 16 pixels on pin 2.
Below is an example to create one for the all platforms. It will manage 16 pixels on pin 2. The pixels use the most common bus speed of 800Kbps, and the most common color order of Green, Red, and then Blue.
```
NeoPixelBus<NeoGrbFeature, NeoAvr800KbpsMethod> strip(16, 2);
NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod> strip(16, 2);
```
And this will create one that is compatible with an ESP-01. It will manage 32 pixels, but due to the method being hardware limited, the pin value passed in is ignored.
```
@@ -32,17 +32,16 @@ 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 chips. This work is directly taken from AdaFruit's NeoPixel library and all credit should go to them.
## Neo800KbpsMethod
The Neo800KbpsMethod is the standard one to use with most Arduino boards.
It will automatically pick board specific defaults and this should be the one used unless otherwise needed.
## 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.
## Neo400KbpsMethod
Same as Neo800KbpsMethod but running at the older and slower data rate.
## NeoEsp8266Dma800KbpsMethod
The NeoEsp8266Dma800KbpsMethod is the underlying method that gets used if you use Neo800KbpsMethod on Esp8266 platforms. There should be no need to use it directly.
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.
@@ -50,19 +49,43 @@ It also requires the use of the RDX0/GPIO3 pin which is not exposed on the ESP-0
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.
Same as NeoEsp8266Dma800KbpsMethod but running at the older and slower data rate.
The NeoEsp8266Dma400KbpsMethod is the underlying method that gets used if you use Neo400KbpsMethod on Esp8266 platforms. There should be no need to use it directly.
## 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 it does NOT require an extra buffer. Its main benefit is that it is usable on ESP-01.
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 it does NOT require an extra buffer. Its main benefit is that it is usable on ESP-01.
Use this instead of Neo800KbpsMethod to force your sketch to use the Uart to send data.
## NeoEsp8266Uart400KbpsMethod
Same as NeoEsp8266Uart800KbpsMethod but running at the older and slower data rate.
Same as NeoEsp8266Uart800KbpsMethod but running at the older and slower data rate.
Use this instead of Neo400KbpsMethod to force your sketch to use the Uart to send data.
## 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 it 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.
It is not recommended to use this method except for comparing results with the other methods.
Use this instead of Neo800KbpsMethod to force your sketch to use the Bit Banging to send data.
## NeoEsp8266BitBang400KbpsMethod
Same as NeoEsp8266BitBang800KbpsMethod but running at the older and slower data rate.
Same as NeoEsp8266BitBang800KbpsMethod but running at the older and slower data rate.
Use this instead of Neo400KbpsMethod to force your sketch to use the Bit Banging to send data.
## NeoAvr800KbpsMethod
The NeoAvr800KbpsMethod is the underlying method that gets used if you use Neo800KbpsMethod on AVR platforms. There should be no need to use it directly.
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.
The NeoAvr400KbpsMethod is the underlying method that gets used if you use Neo400KbpsMethod on AVR platforms. There should be no need to use it directly.
This work is directly taken from AdaFruit's NeoPixel library and all credit should go to them.
## NeoArm800KbpsMethod
The NeoArm800KbpsMethod is the underlying method that gets used if you use Neo800KbpsMethod on ARM platforms. There should be no need to use it directly.
This work is directly taken from AdaFruit's NeoPixel library and all credit should go to them.
## NeoArm400KbpsMethod
Same as NeoArm800KbpsMethod but running at the older and slower data rate.
The NeoArm400KbpsMethod is the underlying method that gets used if you use Neo400KbpsMethod on AVR platforms. There should be no need to use it directly.
This work is directly taken from AdaFruit's NeoPixel library and all credit should go to them.