These are chat archives for Makuna/NeoPixelBus

12th
Aug 2018
Michael Miller
@Makuna
Aug 12 2018 04:24
@MauiJerry what type of LEDs are you using? Newer ones may require the ws*13 method, look in the wiki for it.
Jerry Isdale
@MauiJerry
Aug 12 2018 05:16
adafruit branded 30/meter so ws2812* https://www.adafruit.com/product/1460
also visually compared with images at https://www.elecrow.com/blog/ws2813-vs-ws2812/ to confirm ws2812*
Michael Miller
@Makuna
Aug 12 2018 05:48
The newer versions (ws2812b) have different timing than the older ones. They match the new ws2813. so try using NeoWs2813Method
Jerry Isdale
@MauiJerry
Aug 12 2018 07:02
I got it working using NeoEsp32I2s0Ws2813Method and then tried NeoWs2813Method both work solid. thats excellent. Mahalo!
now to figure if we want to switch our patterns over to Animations, or live with minimal flicker we see now using NeoEffects. The hacker in me wants to convert to see how well it transfers... but client may not be paying for it just yet. Good Enough can be Done when $ and time budget is gone.
but i like your library a lot. has it been used with Teensy 3.x (my fav processor)? We are using ESP32 for networking (painlessMesh)
Michael Miller
@Makuna
Aug 12 2018 07:28
It should work with Teensy 3 & 3.1
luisgcu
@luisgcu
Aug 12 2018 15:34
So far this library seems to be solving some of the issues that I had using adafruit neopixel library. What I need is very simply, just use 1 or 2 pixel led fade to indicate statuses of my ESP32 projects. So the pixel are just tiny part of the project. As start point I used the sample code NeopixelFunFadeinOut, that basically what I need, not necessary the color animations, Just need fade a color,, that would have an status meaning . That sample alone works great.. but when combined with the other code on my ESP32 project led flicker from time to time.. So I tried so many different things to get rid of the random flickering. Creating a second task on the program only to call the fade animation. that didn't solve the problem, the flicker appear from time to time. So the last thing I tried was to use this bus method NeoEsp32BitBang400KbpsMethod and it seems to be working ok, so far I can't see any flickering on the pixel. very soon I will put my sample code for that on GitHub just in case someone else needed.
Michael Miller
@Makuna
Aug 12 2018 15:48
@luisgcu see comments above about using ws2813 method. Bit bang should be avoided, but might be ok for only a few pixels.
Michael Miller
@Makuna
Aug 12 2018 16:13
@MauiJerry I glanced at NeoEffects, it exposes a higher level of effects than my animations, but does seem to be achieving the same goals of avoiding delay. My animation support is about managing the asynchronous parts and time parts, but relies on you providing the implementation of the "effect". Its sort of like their custom effect. You can check out a few libraries written to do similar things using NeoPixelBus here
luisgcu
@luisgcu
Aug 12 2018 17:03
@Makuna thanks for the suggestion I have tried those methods but got the same random flickering effect , the only one that is working without a glitch is this one: NeoEsp32BitBang400KbpsMethod (for a single led ).
This below is the modification that I made to your sample code just to fade a led , one color no blend with other color, do this make sense ? or do you see something wrong that my bring unwanted flickering ?
void FadeInFadeOutRinseRepeat(float luminance, uint16_t hslcolor, uint16_t animSpeed )
{
  if (effectState == 0)
  {
    RgbColor target = HslColor(hslcolor / 360.0f, 0.5f, luminance); 
  //  uint16_t time = random(800, 2000);
    animationState[0].StartingColor = strip.GetPixelColor(0);
    animationState[0].EndingColor = target;
    animations.StartAnimation(0, animSpeed, BlendAnimUpdate);
  }
  else if (effectState == 1)
  {
    // fade to black
    // uint16_t time = random(600, 700);   
    animationState[0].StartingColor = strip.GetPixelColor(0);
    animationState[0].EndingColor = RgbColor(0);

    animations.StartAnimation(0, animSpeed, BlendAnimUpdate);
  }

  // toggle to the next effect state
  effectState = (effectState + 1) % 2;
  Serial.print("effectState:= "); Serial.println(effectState);
}
Michael Miller
@Makuna
Aug 12 2018 18:20
@luisgcu How have you wired it up? The FAQ contains several pointers to similar problems. The most common being this one
Make sure not to use a pin being used for something else.
Also, make sure to include a CAP and RESISTOR, like this diagram
Jerry Isdale
@MauiJerry
Aug 12 2018 19:22
@Makuna not the teensy 3.2 or newer? i have a few of the older ones from early projects.
Michael Miller
@Makuna
Aug 12 2018 20:07
@MauiJerry LC is supported, I have not tried a 3.2 but it should work. Give it a try and let me know.