mirror of
https://github.com/Makuna/NeoPixelBus.git
synced 2025-08-07 12:54:26 +02:00
Updated Home (markdown)
54
Home.md
54
Home.md
@@ -5,61 +5,9 @@ This is an Arduino Library that supports sending out data to update a series of
|
||||
## Supported Platforms
|
||||
## Supported Pixels
|
||||
# API
|
||||
## NeoPixelBus object
|
||||
## [NeoPixelBus object](https://github.com/Makuna/NeoPixelBus/wiki/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.
|
||||
|
||||
|
Reference in New Issue
Block a user