Connecting Neopixel ring to Firebase

Hello,

I am trying to control (Neopixel ring + esp8266) with Firebase realtime data. So far, I am able to get firebase data and control the led brightness. I could set the brightness from 1 to 255.

However, the default color is set the blue(don’t know why). I am trying to set the color to red instead of blue. In the for loop scope, I wrote “strip.Color(255,0,0);” to set the color to red but it won’t work.

Any idea how I could change the color?

Below is my code:

void loop() {
  FirebaseObject pixels = Firebase.get("/rgbdata");
  if (Firebase.failed()) {
      Serial.println("Firebase get failed");
      Serial.println(Firebase.error());
      return;
  }

      for (int i = 0; i < strip.numPixels();i++){
     int pixel = pixels.getInt(String("red"));
       strip.setPixelColor(i, (pixel));
      }
      
    strip.show();
    delay(200);
  }

Thanks.

This is the Particle forum :wink:

1 Like

Oh :frowning: , I saw some people using esp8266 in the project so I thought I would be ok to ask.