I am trying to connect the espruino to a ws2812 strip of 144 leds with external power supply, with arduino this is possible by only connecting gnd and Din (attached image). With espruino, I cant get it to run this way.
Is it possible to only connect gnd and data this way, or is there something to change in the code? So far I only use code from the espruino led tutorials. Thanks!
The problem could be because Arduino has 5v IO and Espruino has 3.3v - WS2811/2 are quite picky. When running from Espruino's power supply, the diode drops the main voltage to 4.7v or so, which allows the lights to read the lower data voltage - but when you raise their main voltage, they become less sensitive to the data.
To fix it, get a ~300 Ohm resistor (pretty much anything from 150 to 1k will work) and put it between DIN and 5V. Then use pinMode(DATA_PIN, 'af_opendrain') in Espruino.
It basically allows the data pin to be pulled all the way up to 5v with the resistor, but can pull it down to 0 when needed - it basically turns it into a 5v output.
thank you, this opens the drain
so good, I also have a problem, if we use SK6805-2427 SMD led, so how can I control it, how to use SK6805-2427 to SMT, what kinds of thing do we notice? if I use a RF controller using in controller sk6812 led, it also can control sk6805-2427 led strip. It maybe is a big problem, and someone can help me.
Are you talking about controlling those LEDs from Espruino?
I didn't pay attention and I bought a bunch of SK6812 RGBW instead of WS2812. I want to control it from an ESP826. Is there a way to do so using the official library ? thank you for your answer gents,
Just give it a shot... Im reading different things about SK6812... 3 byte for RGB and 4 byte for RGBW. If it works, the SK6812 is just a 2812 clone. If it does not, you actually have 4 byte RGBW version. I do not know about configurability of built-in neopixel module... It would have to insert an extra byte for every pixel on the string for the W(hite) - 4th - LED. I doubt that a pixel built-in controller is configurable and does detect white pattern of different intensity within the 3-byte data that would control the W(hite) - forth LED - automatically. It is all up to the data feeder to make that decision and do the mix-in of respective switch to and from White.
Just try it - it should work. Worst case your lights expect 4 bytes and the module will complain if the data isn't a multiple of 3 bytes long. In that case, just round up to the nearest multiple of 12 - any extra bytes sent just get ignored by the LEDs.
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem