diff --git a/NeoPixelBus-object.md b/NeoPixelBus-object.md index 87bdec9..8e2bf1b 100644 --- a/NeoPixelBus-object.md +++ b/NeoPixelBus-object.md @@ -4,13 +4,17 @@ This object will be used to set colors on the pixels. When constructed, a ["feat ``` NeoPixelBus strip(pixelCount, pixelPin); ``` -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. +Below is an example to create one for most 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 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](https://github.com/Makuna/NeoPixelBus/wiki/NeoPixelBus-object#neoesp8266uart800kbpsmethod) below. +For the Esp8266 platforms, just omit the pin argument. This is due to hardware support that doesn't allow for selecting a pin. ``` -NeoPixelBus strip(32, 2); +NeoPixelBus 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 strip(32); ``` If you want to drive DotStars instead, use the following to create a bus that uses hardware SPI. ``` @@ -72,13 +76,13 @@ 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. See other esp8266 methods below if you don't have this pin available. +The NeoEsp8266Dma800KbpsMethod only supports the RDX0/GPIO3 pin. The Pin argument is omitted. 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... +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... ``` serial.println("I can still debug using serial println"); ``` @@ -96,13 +100,13 @@ 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. +NeoEsp8266Uart800KbpsMethod only supports the TXD1/GPIO2 pin. The Pin argument is omitted. 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. -If cpu cycles are an issue in your project, see NeoEsp8266AsyncUart800KbpsMethod below. +If CPU cycles are an issue in your project, see NeoEsp8266AsyncUart800KbpsMethod below. 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. @@ -113,7 +117,7 @@ Same as NeoEsp8266Uart800KbpsMethod but running at the older and slower data rat Use this instead of Neo400KbpsMethod to force your sketch to use the Uart to send data. ## NeoEsp8266AsyncUart800KbpsMethod -NeoEsp8266AsyncUart800KbpsMethod only supports the TXD1/GPIO2 pin. The Pin value passed into the constructor is ignored. +NeoEsp8266AsyncUart800KbpsMethod only supports the TXD1/GPIO2 pin. The Pin argument is omitted. 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. @@ -151,6 +155,7 @@ 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. @@ -160,9 +165,11 @@ 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. + ## DotStarSpiMethod -This method should only be used with DotStar color features. It will use the available hardware SPI support for the board you build with. The clock and data pins are not changeable for hardware support. -The pins are often labeled as MOSI for data, and MSCLK or CLK for the clock. +This method should only be used with DotStar color features. +It will use the available hardware SPI support for the board you build with. The clock and data pins are not changeable for hardware support and thus the Pins argument is omitted. +The hardware pins on the board are often labeled as MOSI for data, and MSCLK or CLK for the clock. ## DotStarMethod This method should only be used with DotStar color features. It will use two provided pins for clock and data to implement a software SPI. \ No newline at end of file