mirror of
https://github.com/Makuna/NeoPixelBus.git
synced 2025-08-07 04:44:26 +02:00
Updated NeoPixelBus object (markdown)
@@ -1,6 +1,6 @@
|
||||
See [NeoPixelBus object API Reference](https://github.com/Makuna/NeoPixelBus/wiki/NeoPixelBus-object-API) for more details on the methods exposed.
|
||||
|
||||
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.
|
||||
This object will be used to set colors on the pixels. When constructed, 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 must be supplied to define which pixels you are using and how they are updated.
|
||||
```
|
||||
NeoPixelBus<FEATURE, METHOD> strip(pixelCount, pixelPin);
|
||||
```
|
||||
@@ -8,7 +8,7 @@ Below is an example to create one for the all platforms. It will manage 16 pixe
|
||||
```
|
||||
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. For more details, see NeoEsp8266Uart800KbpsMethod below.
|
||||
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. For more details, see [NeoEsp8266Uart800KbpsMethod](https://github.com/Makuna/NeoPixelBus/wiki/NeoPixelBus-object#neoesp8266uart800kbpsmethod) below.
|
||||
```
|
||||
NeoPixelBus<NeoGrbFeature, NeoEsp8266Uart800KbpsMethod> strip(32, 2);
|
||||
```
|
||||
@@ -42,7 +42,7 @@ These platform methods will define "how" the pixels are updated. While primaril
|
||||
## 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.
|
||||
On the Esp8266 using this Method has a Pin restriction. Please review NeoEsp8266Dma800KbpsMethod below for details.
|
||||
On the Esp8266 using this Method has a Pin restriction. Please review [NeoEsp8266Dma800KbpsMethod](https://github.com/Makuna/NeoPixelBus/wiki/NeoPixelBus-object#neoesp8266dma800kbpsmethod) below for details.
|
||||
|
||||
## Neo400KbpsMethod
|
||||
Same as Neo800KbpsMethod but running at the older and slower data rate.
|
||||
@@ -52,6 +52,8 @@ The NeoEsp8266Dma800KbpsMethod is the underlying method that gets used if you us
|
||||
|
||||
The NeoEsp8266Dma800KbpsMethod only supports the RDX0/GPIO3 pin. The Pin value passed into the constructor is ignored. See other esp8266 methods below if you don't have this pin available.
|
||||
|
||||
NOTE: Due to the varied board layouts for Esp8266, even though the pin maybe exposed, it may not be usable due to some custom feature on the board you use. If you find it not working, you should review the hardware schematic of your board and confirm the pin is not used for other purposes that interferes with it being used for NeoPixelBus.
|
||||
|
||||
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 is not 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...
|
||||
@@ -74,6 +76,8 @@ The NeoEsp8266Dma400KbpsMethod is the underlying method that gets used if you us
|
||||
## NeoEsp8266Uart800KbpsMethod
|
||||
NeoEsp8266Uart800KbpsMethod only supports the TXD1/GPIO2 pin. The Pin value passed into the constructor is ignored.
|
||||
|
||||
NOTE: Due to the varied board layouts for Esp8266, even though the pin maybe exposed, it may not be usable due to some custom feature on the board you use. If you find it not working, you should review the hardware schematic of your board and confirm the pin is not used for other purposes that interferes with it being used for NeoPixelBus.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
Reference in New Issue
Block a user