Problems in implementing rgb led in my code

Hi evrybody

I would like some help in a problem that i got.

I got here a RGB LED WS2812B and i tested the led with the library of neopixel.h it worked fine but when i put it together with the rest of my code it started to give me errors

IN THE EXAMPLE:
i had Particle.h and neopixel.h

uint32_t Wheel(byte WheelPos); // --- (global)

void rainbow(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256; j++) {
    for(i=0; i<strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel((i+j) & 255));
    }
    strip.show();
    delay(wait);
  }
}

In my code i have the same but it gives me the error:
undefined reference to `Wheel(unsigned char)’

I tried to change “uint32_t” to “uint16_t” and it didnt worked either.

My code is to move a robot with 2 DC motors and have 3 IR sensors

can somebody help me? :smiley:

This is only a forward declaration (aka function prototype) which tells the compiler that there will be an implementation of that fn following.
But if it isn't - as I guess you removed it from your code - the compiler will complain.

So either implement it or remove the prototype.

Here you have the Wheel() function prototype shown:

uint32_t Wheel(byte WheelPos); // --- (global)

but did you also include the function in your program?

can you post the whole program?