These are chat archives for Makuna/NeoPixelBus

25th
Mar 2016
3DSasha
@3DSasha
Mar 25 2016 10:33
Hello. Trying to use Neopixelbus. I have NodeMCU ESP-12E module. In my code and in neopixelbus examples is the same problem - after 40-60 seconds of sketch working leds freeze at current at that moment color. But ESP8266 do not freeze - serial.prints continues work. Adafruit lib and examples works fine for hours.
marksev1
@marksev1
Mar 25 2016 11:47
So you guys suggest I should remove the else at the end and instead put and else if(pub.payload_string() == "off")', to explicitly turn it off
it can end with else if right
marksev1
@marksev1
Mar 25 2016 12:12
cool so maybe i'll do it that way
marksev1
@marksev1
Mar 25 2016 13:09
@Makuna adding animations to that sketch would be a bit more envolved right? I would probably take too much of your time away if I'd ask you for help there right :D..Like I copy pasted everything relevant to setrandomseed (and I didn't copypaste that avr stuff), but then there are some functions for animations, should i just copy paste everything :D
from the example
maybe i should be copy pasting out different examples instead of the Animations one (for example from the cyclone, fadeinout and random color one)
marksev1
@marksev1
Mar 25 2016 13:21
Some motivation could be that if we get this working it could be as an example :D
marksev1
@marksev1
Mar 25 2016 13:42
Would be awesome to have lots of different animations, like police lights etc. :D
Michael Miller
@Makuna
Mar 25 2016 16:55
@3DSasha Please provide more details. Which sample sketch? What is the hardware setup (include which pins physically connected and basic circuit components).
@marksev1 The Cylon sample is a good start for animations. If you run into problems and questions ask away. I am actively collecting and documenting (or trying to document in a way that is better for new people).
@marksev1 yes, you can end with an else if ()
Michael Miller
@Makuna
Mar 25 2016 17:02
@3DSasha Also, which sample are you using with Adafruit? I am assuming on the same esp8266 device. Just so you know, the code behind the Adafruit library for Esp8266 is from my BitBang method library. Could you switch to use NeoEsp8266BitBang800KbpsMethod instead of Neo800KbpsMethod to see if the problem goes away.
jakeloggins
@jakeloggins
Mar 25 2016 17:18
Hey Makuna, thanks for making this!
Michael Miller
@Makuna
Mar 25 2016 17:25
@jakeloggins I am glad people are finding it useful.
3DSasha
@3DSasha
Mar 25 2016 18:52
@Makuna All examples (NeoPixelAnimation NeoPixelCylon NeoPixelFunFadeInOut NeoPixelFunLoop NeoPixelFunRandomChange) with default settings, except number of pixels (50 for me). I have lolin nodemcu v3 esp8266 board. Data line of WS2812B connected to board's GPIO3 with R=470 Ohm. Power adapter +5V 2A connected to board's Vin and "+" of led strip. "-" to GND of board and ledstrip. Also i have a polar capasitor 1000mF between + and - of ledstrip, and nothing else. All of examples runs correctly from 15s to 3m30s then leds freezes. All of Adafruit samples works with change my pixel number to 50 and pin number to GPIO3 (to did not change wiring)....
3DSasha
@3DSasha
Mar 25 2016 19:32
@Makuna I tryed NeoEsp8266BitBang800KbpsMethod in examples. Works stable! (Uart method with gpio2 also works stable). Something wrong with DMA in my board :-(((
marksev1
@marksev1
Mar 25 2016 20:30
@Makuna does FastLED lib really have like tons of premade effects in the lib that one just calls? Could you pull them into your lib or would you rather keep the lib more compact?
marksev1
@marksev1
Mar 25 2016 20:40
const RgbColor CylonEyeColor(HtmlColor(0x7f0000)); and RgbColor color; would need to be changed right,...so const HslColor CylonEyeColor(HtmlColor(0x7f0000)); and HslColor color; ....or no need to change that?
marksev1
@marksev1
Mar 25 2016 21:13
also why is for cyclon here - NeoPixelAnimator animations(2); // only ever need 2 animations - a number two in the ( )
marksev1
@marksev1
Mar 25 2016 21:22
Here is the copypasted cyclon example inside the sketch: http://pastebin.com/EbHz3LXi, does anything look off? Also how would I tie start of the Animation with a mqtt topic -> if(pub.payload_string() == "animate") - to what i would need to tie this
Michael Miller
@Makuna
Mar 25 2016 22:50
@3DSasha so you do not have a level shifter between gpio3 and the neopixels? The DMA is a hardware feature so it may may act different due to internal circuits when the feature gets selected. You should really use a level shifter to convert the 3.3v IO to 5v, 3.3v is out of spec for the pixels and while it may sound unrelated, this has been observed that the bit bang works but dma doesn't without one. It is interesting that the uart method works though.
sticilface
@sticilface
Mar 25 2016 22:54
yes. interestingly i just rigged up 300 pixels and drove them fine without level shifting, using the UART method. not a single glitch
Michael Miller
@Makuna
Mar 25 2016 22:55
@marksev1 Fast LED has a bunch of stuff using image buffers and index offsets, superficially what I have seen isn't very flexible. The image buffer work is coming in the form of what I call a texture. I would rather expose examples for interesting effects.
Aditya Tannu
@AdySan
Mar 25 2016 22:56
I've run a 5m (300 led) strip with 3.3v on data too
works fine
3DSasha
@3DSasha
Mar 25 2016 22:56
@Makuna I did think about that shifter, but then i tested some examples with esp with other methods with good results... May be you are right with DMA hardware specials
Michael Miller
@Makuna
Mar 25 2016 22:56
Mmm, I cant, it shows the differences in the neopixel versions.
Which chips are everyone using? The neopixel chip that is.
Aditya Tannu
@AdySan
Mar 25 2016 22:57
ws2812b
Michael Miller
@Makuna
Mar 25 2016 22:59
Mine are also ws2813b, I wonder if the esp boards have different resistors on them that may cause issues?
Aditya Tannu
@AdySan
Mar 25 2016 22:59
I'm mostly using NodeMCU dev kits
Michael Miller
@Makuna
Mar 25 2016 23:00
@3DSasha try it without the extra resistor, in the sketch leave it 4 or 16 pixels,
I use both a Nodemcu v1 and raw 12e boards, and one esp01.
sticilface
@sticilface
Mar 25 2016 23:04
ws2812b
Michael Miller
@Makuna
Mar 25 2016 23:05
Just checked again, mine are the non b version, so a little older.
3DSasha
@3DSasha
Mar 25 2016 23:14
@Makuna with no resistor and 4 (and 16 too) leds in example "NeoPixelFunFadeInOut" : leds freezes during some seconds - much much faster, than with 50 pixel. Resistor i think did not any influence on that. May be my nodemcu is hardware-buggy? Strange results
Michael Miller
@Makuna
Mar 25 2016 23:16
@marksev1 consider the cyclone an example to imitate. The loop looks good. Remove the setup animations as you will replace this. But look what it calls, these calls start an animation that will update the pixels. So where ever you call Setpixel color in the hue handler, you will replace with a start animation,
@marksev1 you asked about the hard coded 2 passed into the animation manager, that is the max animation channels, max number of animations running at once. In your case, it will depend on the effects you want, but maybe only is needed.
@3DSasha do you have a variable power supply? Run the pixels at 3.8v and test.
Michael Miller
@Makuna
Mar 25 2016 23:21
@3DSasha what speed do you run your esp at? 80mhz or 160mhz?
3DSasha
@3DSasha
Mar 25 2016 23:23
@Makuna I tryed both speeds with same results. POwer is not variable. But i have DC-DC module to reduce voltage to 3.8. I'll do it tomorrow
Michael Miller
@Makuna
Mar 25 2016 23:26
Neopixels are speed to run at 3.8v min, this puts the 3.3v IO into spec also, so they should work without the level shifter tgen, but consider one of a test to narrow down issues. But if you look in the faq in the wiki, you will see an entry talking about level shifters, and I have had people report strange results without them that got fixed when they added them.
sticilface
@sticilface
Mar 25 2016 23:55
Whats the best.. 'small' level converter to use? I've ended up with some massive 16 pin chip... when something smaller would probably do?