Sure would like a library to control WS2812 LED strips like Adafruit's NeoPixel library. Thanks
Aren't they 1wire devices? Either that or i2c, and they should already be supported, I thinkSure would like a library to control WS2812 LED strips like Adafruit's NeoPixel library. Thanks
NeoPixel is not 1 Wire or I2C it's a fast serial protocal that use SPI to generate 800kHz serial data.Aren't they 1wire devices? Either that or i2c, and they should already be supported, I think
If you want my advice don't buy the NeoPixels ones they are far too expensive. Go on Ebay or AliExpress and search for WS2812B you will have a lot of strips of all length available and also leds rings of all size.After reading the linked page, I guess it wouldn't be too difficult for someone who can make sense of the accurate timings needed to create a module for the bit-banging... It all comes to setting a pin on and off during the correct amount of time to establish a 1 or 0 bit value...
I could give it s go, but I don't have such LEDs... Yet!
Not a problem.I will order some and dig a bit on this... but you'll need to be patient with me
Interesting. You may learn all that you need from it.
Your leds have the exact same protocol as WS2812Hi,
I have already played with NeoPixel or rather APA102 SPI ledstrips. They are much faster than WS2812 "one wire" strips.
You can find the adafruit library (pure arduino) to drive them.
See more here : https://www.b4x.com/android/forum/threads/jg-ledstrip-apa102.50708/
Your leds have the exact same protocol as WS2812
Edit: I don't know why you think they are faster. They surely use the same WS2812B Driver IC. They are mostly used with Adafruit Neopixel. https://github.com/adafruit/Adafruit_NeoPixel
Finally I believe you are also right. Your leds use 2 wires to talk. They are probably easier and faster to interface since they use real SPI protocol. The problem with NeoPixel is that they must use a full 8bits SPI data to send 1 bit to the display so a total of 24 bytes must be send by the SPI port to address 1 LED. This greatly limit the speed and overuse the AVR. Happily other way exit to talk more easily to those LED strips.Oups sorry you are totally right. I read too fast and made the confusion with the "old style" one wire leds (And I did forgot their names)
Sorry for the trouble... APA102 and WS2812 should indeed be the same, with same (fast) speed.
Finally I believe you are also right. Your leds use 2 wires to talk. They are probably easier and faster to interface since they use real SPI protocol. The problem with NeoPixel is that they must use a full 8bits SPI data to send 1 bit to the display so a total of 24 bytes must be send by the SPI port to address 1 LED. This greatly limit the speed and overuse the AVR. Happily other way exit to talk more easily to those LED strips.
NeoPixel works very well with ESP8266Just the other day I was also wondering if the hardware SPI of the ESP8266 could be used to control the WS2812 in a tricky way. I mean, use HSPI but only connect the data line.
Taking into account "1" and "0" timings, each WS2812 symbol ("1" or "0") could be translated to 3 SPI bits (110 or 100) and with the appropiate SPI clock, let the ESP8266 do the work. I think that setting the clock to 3MHz, it will be about 1usec per WS2812 symbol (bit)
Still much slower than APA102, but no need to do precise time critical routines.
That's clever Jordi.Just the other day I was also wondering if the hardware SPI of the ESP8266 could be used to control the WS2812 in a tricky way. I mean, use HSPI but only connect the data line.
Taking into account "1" and "0" timings, each WS2812 symbol ("1" or "0") could be translated to 3 SPI bits (110 or 100) and with the appropiate SPI clock, let the ESP8266 do the work. I think that setting the clock to 3MHz, it will be about 1usec per WS2812 symbol (bit)
Still much slower than APA102, but no need to do precise time critical routines.