Updated DotStar Methods (markdown)

Michael Miller
2023-04-04 14:07:07 -07:00
parent 69e70bb51b
commit b47870ba10

@@ -1,26 +1,62 @@
Below you will find the list of DotStar Methods. They should only be used with DotStar Features. While an attempt has been made to keep this list up to date, new methods may not be listed.
There is a large selection of DotStar Methods to pick from. They should only be used with DotStar Features. The names of them come in several varieties: the bit bang, hardware SPI, hardware SPI with a specific speed, and the platform specific named.
## 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.
Generally the clock and data pins are not changeable for hardware support and thus the Pins argument is omitted on the constructor. If the pins are changeable like on the ESP32, then provide the pins to `Begin`.
The hardware pins on the board are often labeled as MOSI for data, and MSCLK or CLK for the clock.
### The BitBang named:
**"\<insert LED name\>Method"**
Simply insert the model name of your LED before "Method" and more than likely you will find a method that works for you.
* **DotStar**Method - (generic DotStar, APA 102) The most compatible and if yours isn't listed below a good first selection.
* **Ws2801**Method - (WS2801)
* **Tlc5947**Method - (TLC5947)
* **P9813**Method - (P9813) Must use the P9813BgrFeature.
* **Lpd8806**Method - (LPD8806) Must use either Lpd8806BrgFeature or Lpd8806GrbFeature color feature.
* **Lpd6803**Method - (LPD6803) Must use one of the many Lpd6803*Feature.
The default SPI clock speed is 10MHz. To use another clock speed, choose one of the following instead of `DotStarSpiMethod`:
Provide the Pins to use for Data and Clock using the `strip.Begin()`.
```
DotStarSpi40MhzMethod
DotStarSpi20MhzMethod
DotStarSpi10MhzMethod
DotStarSpi2MhzMethod
DotStarSpi1MhzMethod
DotStarSpi500KhzMethod
```
### Hardware SPI named:
**"\<insert LED name\>SpiMethod"**
Simply insert the model name of your LED before "SpiMethod". It will use the available hardware SPI support for the board you build with.
* **DotStarSpi**Method - (generic DotStar, APA 102) The most compatible and if yours isn't listed below a good first selection.
* **Ws2801Spi**Method - (WS2801)
* **Tlc5947Spi**Method - (TLC5947)
* **P9813Spi**Method - (P9813) Must use the P9813BgrFeature.
* **Lpd8806Spi**Method - (LPD8806) Must use either Lpd8806BrgFeature or Lpd8806GrbFeature color feature.
* **Lpd6803Spi**Method - (LPD6803) Must use one of the many Lpd6803*Feature.
## 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.
Generally, the clock and data pins are not changeable for hardware support and thus the Pins argument is omitted on the constructor. If the pins are changeable like on the ESP32, then provide the pins to `strip.Begin()`.
NOTE: The hardware pins on the board are often labeled as MOSI for data, and MSCLK or CLK for the clock.
NOTE: The SPI clock speed will be 10MHz.
## Platform specific Methods
In most cases the above should be all the methods you need to use for all platforms. In a few cases, there are alternative methods that are useful to use on some platforms. Below are links to the platform specific methods.
### Hardware SPI with specific speed named:
**"\<insert LED name\>Spi\<speed\>Method"**
Simply insert the model name of your LED before "Spi", add a speed designator, and then append with "Method". It will use the available hardware SPI support for the board you build with.
The optional speed designator can be any of the following:
* 40Mhz - very high speed, not all LEDs support this.
* 20Mhz - high speed, most LEDs support this but requires extra care be taken with the wires for good signal without noise.
* 30Mhz - only used with TLC5947. the default for standalone LEDs.
* 10Mhz - the default speed
* 15Mhz - only used with TLC5947. the default for cascaded LEDs.
* 5Mhz - slower speed good for more noisy signal wires
* 2Mhz - slow speed good for poor wiring
* 1Mhz - slow speed good for poor wiring
* 500Kh - slow speed good for poor wiring
* Hz - exposes the ability to set the speed at run-time. See `strip.SetMethodSettings()` and `NeoSpiSettings`.
A few examples would be:
* DotStar**Spi40Mhz**Method - generic DotStar running on hardware SPI at 40Mhz.
* Ws2801**Spi2Mhz**Method - WS2801 running on hardware SPI at 2Mhz.
* Tlc5947**Spi15Mhz**Method - TLC5947 running at its low normal of 15Mhz.
* P9813**SpiHz**Method - P9813 running on hardware SPI with the speed set at run-time by latter calling `strip.SetMethodSettings()`.
Generally, the clock and data pins are not changeable for hardware support and thus the Pins argument is omitted on the constructor. If the pins are changeable like on the ESP32, then provide the pins to `Begin`.
NOTE: The hardware pins on the board are often labeled as MOSI for data, and MSCLK or CLK for the clock.
### The platform specific named:
**"\<insert LED name\>\<insert hardware detail\>\<insert option speed\>Method"**
In most cases the above basic named methods should be all the methods you need to use for all platforms. In a few cases, there are alternative methods that are useful to use on some platforms. Here are just a few examples...
* DotStar**Esp32Vspi**Method - ESP32 platform, using hardware VSPI to drive output, for the generic DotStar.
* DotStar**Esp32Hspi2Mhz**Method - ESP32 platform, using hardware HSPI to drive output, at 2Mhz speed, for the generic DotStar.
* DotStar**Esp32DmaSpi**Method - ESP32 platform, using hardware DMA SPI to asynchronously drive output, for the generic DotStar.
Currently supported platforms that have specific methods:
* [Esp32 Platform specific methods](https://github.com/Makuna/NeoPixelBus/wiki/ESP32-DotStar-Methods)