Giving multiple leds in a ledring the same color

I'm new to arduino.
I want to indicate the pressure in a tube by the colors on a ledring.
But I don't know how to say that multiple leds need to be green by example.
Can someone help?
Right now I've got this:

pixels.clear();
pixels.setBrightness(5);
if(pressure_hPa<1020){
pixels.setPixelColor(0, pixels.Color(0, 255, 0));
pixels.show();
pixels.clear();
}

This line pixels.setPixelColor(0, pixels.Color(0, 255, 0)); sets the colour of pixel 0 to green

How about using a for loop variable for the first parameter ?

Thx, helps a lot.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.