EmbDev.net

Forum: µC & Digital Electronics NeoPixel Code


Author: Argonaut (Guest)
Posted on:

Rate this post
0 useful
not useful
What does "wait" do in this function?

// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip.numPixels(); i++) {
    strip.setPixelColor(i, c);
    strip.show();
    delay(wait);
  }

Thanks in advance vor the answer.

: Moved by Moderator
Author: Ingo Less (Guest)
Posted on:

Rate this post
0 useful
not useful
Argonaut wrote:
> What does "wait" do in this function?

> delay(wait);
It delays the programm for "wait"-time

Author: SebiR (Guest)
Posted on:

Rate this post
0 useful
not useful
It slows down the animation, so you can see each pixel light up.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.