Updated NeoPixelBus object (markdown)

Michael Miller
2016-12-19 00:30:03 -08:00
parent eab45ab807
commit 6fba3b2e27

@@ -12,10 +12,7 @@ For the Esp8266 platforms, just omit the pin argument. This is due to hardware
``` ```
NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod> strip(16); NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod> strip(16);
``` ```
And this will create one that is fully compatible with an ESP-01. It will manage 32 pixels. For more details, see [NeoEsp8266Uart800KbpsMethod](https://github.com/Makuna/NeoPixelBus/wiki/NeoPixelBus-object#neoesp8266uart800kbpsmethod) below.
```
NeoPixelBus<NeoGrbFeature, NeoEsp8266Uart800KbpsMethod> strip(32);
```
If you want to drive DotStars instead, use the following to create a bus that uses hardware SPI. If you want to drive DotStars instead, use the following to create a bus that uses hardware SPI.
``` ```
NeoPixelBus<DotStarBgrFeature, DotStarSpiMethod> strip(32); NeoPixelBus<DotStarBgrFeature, DotStarSpiMethod> strip(32);
@@ -82,7 +79,7 @@ NOTE: Due to the varied board layouts for Esp8266, even though the pin maybe ex
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. 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. This pin may not be correctly exposed on the ESP-01. The normal feature of this pin is the "Serial" receive. Using this DMA method will not allow you to receive serial from the primary Serial object; but it will not stop you from sending output like this... It also requires the use of the RDX0/GPIO3 pin. The normal feature of this pin is the "Serial" receive. Using this DMA method will not allow you to receive serial from the primary Serial object; but it will not stop you from sending output like this...
``` ```
serial.println("I can still debug using serial println"); serial.println("I can still debug using serial println");
``` ```
@@ -93,7 +90,7 @@ Second, the NeoPixelBus::Begin() MUST be called after the Serial.begin(). If th
For more details on Serial and pins, refer to the [Esp8266 Arduino Reference](http://esp8266.github.io/Arduino/versions/2.1.0/doc/reference.html) For more details on Serial and pins, refer to the [Esp8266 Arduino Reference](http://esp8266.github.io/Arduino/versions/2.1.0/doc/reference.html)
Thanks to g3gg0.de for porting the initial DMA support from the original which led to this work. The original was located at [github/cnlohr/esp8266ws2812i2s](https://github.com/cnlohr/esp8266ws2812i2s). The current work is no longer based on that but it gave me the direction I needed to provide a solution. _Thanks to g3gg0.de for porting the initial DMA support from the original which led to this work. The original was located at [github/cnlohr/esp8266ws2812i2s](https://github.com/cnlohr/esp8266ws2812i2s). The current work is no longer based on that but it gave me the direction I needed to provide a solution._
## NeoEsp8266Dma400KbpsMethod ## 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.
@@ -125,7 +122,7 @@ This method uses the UART interrupt to read from a secondary buffer to send the
If memory is an issue for your project, see the NeoEsp8266Uart800KbpsMethod above. If memory is an issue for your project, see the NeoEsp8266Uart800KbpsMethod above.
Thanks to unaiur for providing the implementation. _Thanks to unaiur for providing the implementation._
Due to using the TXD1/GPIO2 pin, the Serial1 object can not be used with the method and must be avoided. The primary serial object "Serial" is available for both read and write. Due to using the TXD1/GPIO2 pin, the Serial1 object can not be used with the method and must be avoided. The primary serial object "Serial" is available for both read and write.