EmbDev.net

Forum: µC & Digital Electronics NeoPixel Code


von Argonaut (Guest)


Rate this post
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 User
von Ingo Less (Guest)


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

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

von SebiR (Guest)


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

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.