Question

How do i send data manually (without any pre-made library) to a ws2801 led strip with a arduino?

I'm not asking for someone to write the code for me, just a push in the right direction.

i have a arduino leonardo

Was it helpful?

Solution

You use SPI, which is 3 data lines from the Arduino.

Check out this tutorial: Tronix SPI tutorial

and then the Arduino library/tutorial: Arduino SPI Tutorial/Library

Now check the datasheet and see what you can learn from it: WS2801 datasheet

There are several video tutorials online about using the Arduino, check them out once you grok SPI it's really quite simple.:

OTHER TIPS

The WS2801, does use a SPI type interface similar to a Shift register, you push 3 Bytes of data to populate the first chip, then keep pushing more Bytes for an overflow.

The Data Sheet shows two wire, Clock & Data; but you can also connect POL (Output polarity reversal) up to a PWM output for intensity, thus the 3-wire interface.

Look at Adafruit-WS2801-Library for additional guidance.

This is several years later, but I'd been looking into the same subject, and found some relevant information that could help the next reader.

This project by Josh Levine uses 7 WS2812B strips to display scrolling text. The strips are connected in parallel to a single Arduino board, and the code for it does not use any pre-built library.

Check out the code here. The main thing is that the timing for WS2812b is very specific, and the code uses ASM to get the timing right. More reading about the WS2812 timing here.

Additional reading: If you're interested in how the LED strips connected in parallel work, Josh has also written up an article explaining his bit-crunching technique for this, which you can read here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top