GitXplorerGitXplorer
b

ws2811-multi

public
10 stars
8 forks
0 issues

Commits

List of commits on branch master.
Unverified
886545b0cc1374069f616bcbece8b493fb1a7b7a

Adapt the example.

bbalrog-kun committed 10 years ago
Unverified
5615899b3c98c870de9de5625d4fde165ad1b457

Move demo file to subdirectory to fix library compilation.

bbalrog-kun committed 10 years ago
Unverified
922bd24424213824b6bb531551c6b4c71444fa2e

Add a README.

bbalrog-kun committed 10 years ago
Unverified
d4614e9ea57280d529b20273803a300a27e3aca2

3 and 4 simultanous outputs support if pins share the port.

bbalrog-kun committed 10 years ago
Unverified
2233c8d5288325bf5bb14e149b184153e52c1023

Support two simultenous outputs of two datasets.

bbalrog-kun committed 10 years ago
Unverified
56ffdb179777d17cb1e6d9a3a780b898f11bd53b

Reorder rgb_t's fields and simplify the assembly loop.

bbalrog-kun committed 10 years ago

README

The README file for this repository.

WS2811 multiple strips library

The WS2811 RGB LED strips have extremely many potential uses. In some of them, like POV displays, very high refresh rates are needed. If all your LEDs are connected serially, the time required to update all of the pixel values or any subset of them is 30us times the total number of LEDs connected -- even if you don't need to update all of their colours. At, say, 100 LEDs that's already 3ms per refresh, which limits your total frame rate to 300 Hz and on an Arduino if you add all other overheads you may end up with even lower rates.

To improve on this a little, you can connect various strips in parallel instead of serially, i.e. with their data lines connected to different Atmega GPIO pins. The routines in this version of WS2811.h allow outputting the pixel data to up to 4 strips at the same time, if connected to GPIOs on the same Atmega port (e.g. PC0, PC1) of 2 strips if connected to different ports (e.g. PC2 and PB4).

For example 4 strips of 25 LEDs connected to PC0 - PC3 (A0 to A3 in Arduino naming) can be updated in about 750us. Not an order of magnitude jump but enough to make some projects practical.

Further improvement

With some further assumptions you can probably drive up to at least 16 different LED strips from an Arduino, this library doesn't have any support for that. It would require some preprocessing of the pixel data before outputting it to the AVR digital pins, so if you're animating something that may not be viable, but if you've got static data it might work. This also requires a good amount of memory, so your strips probably can't be too long if you're on an Atmega328P. Someone has already implemented that and explains the details here with the 8 LED strips case: http://rurandom.org/justintime/index.php?title=Driving_the_WS2811_at_800_kHz_with_an_8_MHz_AVR

Installation

Like with every Arduino library, put the files in a "libraries" directory in one of the various standard paths, and restart the Arduino IDE. The name of the subdirectory inside "libraries" needs to be WS2811. For example, clone this repository, cd inside, and do ln -s pwd ~/Arduino/libraries/WS2811