WS2812B Burning ember effect

Hi,
Total starter, spent 3 weeks trying to find a sketch, that gives a burning ember effect, reds, glowing and out at random. I know supposed to help 1 self 1st, but desperate, make an old man happy if some one be kind enough to do. Tried the online animators for WS2812B, but not working as expected. Please help...

Hi @bjl1 ,
Welcome to the forum..

UnoWipeFire

Maybe this helps..

good luck.. ~q

Thank you for your time out in reply it is appreciated,
taken the button sketch side out still nothing.
Thanks anyways

Hi @bjl1 ,
You're welcome..

Do you just want fire to run all the time??

~q

Was hoping so :slightly_smiling_face:

Regards

try this..
UnoFireAni

good luck.. ~q

OMG The red looks almost what looking for, but without the flashing green blue white, please. Thank you so much for reply

Check the link again..
commented out some code, leaving just the coolest color..
~q

OK Thanks, hmm strange, as on the link, the circle LEDs work total different to the lWS281B, as get mix flashing blues, greens, and whites?, tried deleting. LOl. Anyways thanks for the help

1 Like

Do you have the right kind of neopixel specified?

If you have BGRW LEDs it would look really weird but otherwise not give a whisper of a complaint.

NEO_GRB

Sry, can't cut and paste with this stupid tablet. Yes, I know, I'm stupid, not the tablet. Anyway, make sure your use of the strip is consistent with the type you have.

a7

Appreciated help alto thanks for the time out, playing with figures, go the effect wanting, but just little too fast, removed AniStepDelay = 15;
Spot on :slight_smile:
Appreciated help alto thanks for the time out, playing with figures, go the effect wanting, but just little too fast, removed AniStepDelay = 15;
Spot on

I'm sure you know by now we all want you to become, or at least progress towards, being a better programmer.

I see it was all within the code lines I post here:

int AniStepDelay = 250;
bool AniDone = true;


void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
  AniStepDelay = 15;
}

void loop() {
  StepAni();
}



void StepAni ()
{ //see if it's time for a step..
  unsigned long currMilli = millis();
  if (currMilli - msecLastAniStep >= AniStepDelay)
  {
    msecLastAniStep = currMilli;
    Fire(55, 120, 15, 1); 
  }
}

There is a global variable with the totally misleading name AniStepDelay, which oddly has something to do with the delay between animation steps.

It is initialised to 250, which in this case is 250 milliseconds between steps. 0.25 seconds:

int AniStepDelay = 250;

It was changed right away in a step of the setup() function, which function I hope you know is intended to execute once, at the very start of the sketch.

Changed to 15, so now animation steps are doled out every 15 milliseconds, 0.015 seconds, somewhat faster:

  AniStepDelay = 15;

The mechanism for doling out something every N milliseconds is practically idiomatic, and is something you should endeavour to warp your mind around:

  unsigned long currMilli = millis();
  if (currMilli - msecLastAniStep >= AniStepDelay)
  {
    msecLastAniStep = currMilli;
    Fire(55, 120, 15, 1); 
  }

By removing the line that changed it, you inadvertently are using the original initial value. Still too fast, or not fast enough? Imma let you figure out what to do.

It may not seem so, but you can actually read code, line by line, to see what it does and why. No good writer of anything is not also widely read.

You will accomplish much more if you take some time away from finding code, pounding on it with blunt tools and appealing to the kindness of strangers and instead start where we all did, knowing nothin' about nothing.

There has never been a better time than now, with the entire internets jammed packed with helpful tutorials, videos and so forth. Imagine sitting at home in the dark ages with nothing but a text book, not even a real computer, trying to get anywhere.

Good luck, but it isn't luck so much as the hard work!

a7

1 Like

Alto, when started out as a magician, was taken under wing by some of the Middlesbrough Circle of Magician's wing, as in my audition my enthusiasm, they brought me on to what i never thought i could be, was dur they knew i put everything into it. This is total new to me, and some of the comments from the coders, is rather a put off, have been on this project for aye on 9mths. Seeing the power of the arduino, have many a magical projects id love to do, as have a very imaginative mind. Had created an effect that was discontinued in the 80`s far more sophisticated. Than the original magical effect. It absolute frustrates me i dont have the knowledge in this field.
..

As mentioned another person on here a Grumpy Mike seriously needs a head shake reality check, regardless his attitude is appalling. But to likes of you appreciated

Considering you beg for code, and when you get it, you don't accept it, and don't even appreciate it. I would say "GrumpyMike" has the right attitude and YOU need to get a reality check.

You didn't hunt for weeks. You started begging for code last week. Try reading a book.