Skip to content
Michael Miller edited this page Jan 17, 2019 · 2 revisions

Using DotStars, why would I use the SPI method over the general purpose method?

There are two DotStar Methods.
DotStarSpiMethod will use the available SPI library of Arduino to send the data. Often this is tied to hardware with pin limitations but will you give better performance.
DotStarMethod will Bitbang the data stream on any given pin set. Often this slower and is directly related to the speed of the MCU.

My suggestion is to start with DotStarMethod until you have your sketch working. Then try the DotStarSpiMethod as you work on performance of your sketch.

Here is some timing numbers I captured. They are taken from sending to a strip of 4 LEDs.

Esp8266

DotStarMethod = 520us
DotStarSpiMethod = 47us
Significant differences between the two. Obviously if you have SPI available for use, it would be good to use it.

Esp32

DotStarMethod = 62us
DotStarSpiMethod = 49us
Not a very significant difference. But if you are updating a longer strip it might be worth using SPI.

Clone this wiki locally