Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:47
    Makuna closed #283
  • 00:47
    Makuna opened #283
  • Aug 15 23:45
    rdragonrydr opened #282
  • Aug 15 01:58
    Makuna updated the wiki
  • Aug 15 01:53
    Makuna labeled #280
  • Aug 15 01:53
    Makuna assigned #280
  • Aug 15 01:50
    Makuna closed #281
  • Aug 15 01:50
    Makuna opened #281
  • Aug 08 16:54
    Makuna edited #280
  • Aug 06 18:46
    dwalker-uk edited #280
  • Aug 06 18:42
    dwalker-uk opened #280
  • Aug 04 17:28
    Makuna closed #278
  • Jul 28 11:36
    OttoWinter closed #277
  • Jul 26 06:52
    Makuna updated the wiki
  • Jul 24 17:52
    Makuna closed #279
  • Jul 24 17:47
    Makuna labeled #279
  • Jul 24 17:47
    Makuna unlabeled #279
  • Jul 24 17:47
    Makuna labeled #279
  • Jul 24 12:44
    laserdave opened #279
  • Jul 16 15:36
    Makuna updated the wiki
Michael Miller
@Makuna

You will find this chunk of code

    // if progress moves fast enough, we may move more than
    // one pixel, so we update all between the calculated and
    // the last
    if (lastPixel != nextPixel)
    {
        for (uint16_t i = lastPixel + moveDir; i != nextPixel; i += moveDir)
        {
            strip.SetPixelColor(i, CylonEyeColor);
        }
    }
    strip.SetPixelColor(nextPixel, CylonEyeColor);

You could change this to the explicit number you want, -10 to +10, so it would be replace by just

        for (uint16_t i = nextPixel - 10; i != nextPixel + 10; i++)
        {
            strip.SetPixelColor(i, CylonEyeColor);
        }

Assuming your strip is not with 10 of max uint16_t it should just work.

HippoDan
@HippoDan
Hi, trying to get things going on an ESP8266. (Currently testing on a NodeMCU 1.0) . I want to use SetBrightness(); but I keep getting this:
Users/hippo/Documents/Arduino/ESP8266_Neopixelbus_IR/ESP8266_Neopixelbus_IR.ino: In function 'void loop()':
ESP8266_Neopixelbus_IR:126:17: error: 'class NeoPixelBus<NeoGrbFeature, NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeed800Kbps> >' has no member named 'SetBrightness'
           strip.SetBrightness(Brightness);
                 ^
exit status 1
'class NeoPixelBus<NeoGrbFeature, NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeed800Kbps> >' has no member named 'SetBrightness'
HippoDan
@HippoDan
Everything works until I add brightness. The output and lights are working up to this point.
HippoDan
@HippoDan
Got It! Looks like I needed to:
NeoPixelBrightnessBus<NeoGrbFeature, NeoEsp8266Dma800KbpsMethod> strip(PixelCount);
Michael Miller
@Makuna
@HippoDan Yup. Do you ever call GetPixelColor? If you do, avoid the whole brightness concept as it is fraught with problems. The Adafruit library has this built in, but I removed it explicitly as calling GetPixelColor will not return the same color you set it with, due to integer quantization and application of the brightness.
HippoDan
@HippoDan
Actually I probably won't ever call GetPixelColor. I'm really just planning to put together a few canned effects with an ir remote and espalexa. I think in my case the brightness, which is a direct result from Alexa calls will be more convenient than detrimental.
XxXCobraXxX
@XxXCobraXxX
Hello again Michael.
XxXCobraXxX
@XxXCobraXxX
sorry but i have tell you too less what iam using. I have a ESP8266-12E and I use the latest EasyESP-Mega with your NeoPixelBus Plugin. In your Plugin i have created a FHEM Controller. That works perfectly. but i want to have a wider Knight Rider Effect named k.i.t.t. in your plugin. i dont find the code where i have to change the num of pixels to slide... :-)
Michael Miller
@Makuna
There is no code that is specificly sets a number of pixels, it is just an artifact of how long it takes to fade the pixels that are presently in the buffer. Above, I pointed at where you make a change above with some replacement code that will allow a specific number. Have you tried that?
XxXCobraXxX
@XxXCobraXxX
Hello Michael. do you speak german?
Michael Miller
@Makuna
sorry, I do not.
XxXCobraXxX
@XxXCobraXxX
ok no problem. but sry for my english ;-)
and i have one bigger problem. if i set the number of pixels until 300 in the NeoPixelBus device in EasyESP all effects works fine but if i put in more than 300 pixels (in my case 520 pixels) the effects "all" and "fire" dont work anymore. if i activate the "all" effect, all pixels goes off that are on from the previous selected effect and the ESP becomes a freeze (the EasyESP frontend is no longer available) and i have to restart the ESP via the power supply. If i select the "fire" effect all pixels that are on from the previous selected effect freezes (but stays on), the EasyESP frontend is still available and no effect is working anymore until i restart the ESP via the power supply
XxXCobraXxX
@XxXCobraXxX
i have the same result with the ESP8266-12E and the Wemos D1 mini pro
for info: i use the SK6812 RGBW LED stripes and i have defined the color order GRBW and the NeoEsp8266DmaSk6812Method in the _P124_NeoPixelBusFX.ino file
XxXCobraXxX
@XxXCobraXxX
thank you very much for your help in advance
XxXCobraXxX
@XxXCobraXxX

There is no code that is specificly sets a number of pixels, it is just an artifact of how long it takes to fade the pixels that are presently in the buffer. Above, I pointed at where you make a change above with some replacement code that will allow a specific number. Have you tried that?

Sorry but i dont know where i have to put your above code... i have found this function in the _P124_NeoPixelBusFX.ino file. Can i use your above code there? if yes how?

i have only basic programming knowledge :(

// Larson Scanner K.I.T.T.
void kitt(void) {

  if (counter20ms % ( SPEED_MAX / abs(speed) ) == 0)
  {
    for(uint16_t i=0; i < pixelCount; i++) {

      #if defined(RGBW) || defined(GRBW)
        RgbwColor px_rgb = Plugin_124_pixels->GetPixelColor(i);

        // fade out (divide by 2)
        px_rgb.R = px_rgb.R >> 1;
        px_rgb.G = px_rgb.G >> 1;
        px_rgb.B = px_rgb.B >> 1;
        px_rgb.W = px_rgb.W >> 1;

      #else

        RgbColor px_rgb = Plugin_124_pixels->GetPixelColor(i);

        // fade out (divide by 2)
        px_rgb.R = px_rgb.R >> 1;
        px_rgb.G = px_rgb.G >> 1;
        px_rgb.B = px_rgb.B >> 1;
      #endif

      Plugin_124_pixels->SetPixelColor(i, px_rgb);
    }

    uint16_t pos = 0;

    if(_counter_mode_step < pixelCount) {
      pos = _counter_mode_step;
    } else {
      pos = (pixelCount * 2) - _counter_mode_step - 2;
    }

    Plugin_124_pixels->SetPixelColor(pos, rgb);

    _counter_mode_step = (_counter_mode_step + 1) % ((pixelCount * 2) - 2);
  }
}
Michael Miller
@Makuna
try NeoWs2812xMethod instead
You may want to talk with the EasyEsp people also.
XxXCobraXxX
@XxXCobraXxX
ok i will test it. thank yo very much
cranton
@cranton
Hi, I am using the current release of the NeoPixelBus library on my ESP32. I am driving two led stripes with the RMT Methods (using 2 channels). On both stripes I have around 50 LEDs (48/50). But the LEDs are flickering unregularly every second.
With the same HW setup, but with an esp8266 I did not have this problem. (I had another one, thats why I switched to the eps32). I already switched the level shifter so that the protocol line has real 5V. My power supply is big enough to drive these LEDs. If I reduce the LED number to 20 on each stripe the flickering stops.
markusrudolf
@markusrudolf
Have you tried supplying power from both ends of the strip at the same time?
cranton
@cranton
No because with the esp8266 I had no problems. So for me it tends to be a software problem.
Michael Miller
@Makuna
do you have a minimal sample sketch that demonstrates the problem?
cranton
@cranton
I found a solution for me. After I put a delay(5) between the show() functions of the two stripes they weren't flickering any more. A sample sketch is difficult because it's part of bigger project including "threads", i2c and Ota. Direct hardware access is not easy.
Michael Miller
@Makuna
Between each strips show or between each set of calls to show? If you provide how you defined the strips will help. And an idea of where and how you call show.
cranton
@cranton
NeoPixelBrightnessBus<NeoGrbwFeature, NeoEsp32Rmt0Sk6812Method> strip1;
NeoPixelBrightnessBus<NeoGrbwFeature, NeoEsp32Rmt1Sk6812Method> strip2;

void LedController::show() {
strip1.SetBrightness(brightness*LED_CTRL_BRIGHTNESS_FACTOR);
strip1.Show();

//without delay here my Leds are flickering
//1ms is not enough after I changed it to 5 it is ok
delay(5);
strip2.SetBrightness(brightness*LED_CTRL_BRIGHTNESS_FACTOR);
strip2.Show();

}

cranton
@cranton
I forgot to mention. The show function is called every 10ms
Michael Miller
@Makuna
Try changing NeoEsp32Rmt#Sk6812Method to NeoEsp32Rmt#Ws2812xMethod without the extra delay and let me know.
cranton
@cranton
It's flickering without delay both methods
Michael Miller
@Makuna
so, your declaration of the strips also include the count, you didn't just define them the way you did above?
One more thing to try, change the order of your calls such that the shows are right next to each other like
strip1.SetBrightness(blah);
strip2.SetBrightness(blah);

strip1.Show();
strip2.Show();
cranton
@cranton
Sure, I have done this in the constructor
Thanks for your help. But now I'm going on a 2 week journey. I have to test it afterwards.
L0laapk3
@L0laapk3
If I use on esp8266 the RX pin (gpio3) as data output, will this fuck with my ability to upload sketches?
as i understand it, when uploading the esp is reset and brought into an upload state so it wont matter since ws2812b data line doesnt like pull down or up on it i hope
L0laapk3
@L0laapk3
it seems like it does affect it, that kinda stinks\
Michael Miller
@Makuna
@L0laapk3 I have had no problems uploading sketches other than the "effect" that LEDs may light up during the sketch upload. This can be problematic if you have not rated your power supply to match the LED maximum power draw as it will bring the amperage/voltage down and cause problems with the upload.
IF you are supplying enough power for max draw on your LEDs, then the upload should work and the visual effect will get reset when the sketch first runs.
L0laapk3
@L0laapk3
it didnt let me upload at all so i ended up putting a connector inbetween them
my power supply is good enough and also separated from the controller
might be the difference between ws2812b and whatever you have
Michael Miller
@Makuna
btw, ws2812b is rather a general "model". All models with this ID are different than several generations of them. They really should have changed the model names but they didn't. So expect minor nuances with any NeoPixel.
Your strip/module might have an integrated resistor or cap which can cause issues; I have just never seen it with all the models I have.
But, like what you did, having a bypass switch is always the most risk free solution.
L0laapk3
@L0laapk3
oh
i had no idea
Michael Miller
@Makuna
This is why I use ws2812x in the naming ;-)
L0laapk3
@L0laapk3
image.png
shitty cage xD
Phil Letourneau
@philletourneau
Hi Folks, just started using this library, and so far I really like it
Michael Miller
@Makuna
Welcome