No idea: you talk German and English (I am fine with both, but anybody else?).
My guess:
if you can set any color with your functions, I would assume all is RGB code for the color.
Just increment the right part (R or G or B) and sweep it to make a fading blue effect.
I think you try to do it already.
Where is the problem?
When you do pixels.clear() - does it mean you turn all LEDs off, it sets to default color (or dark)?
And later you change just one component of RDB?
This might look like just a single color, the wrong color.
Just check if you "modify" the RGB color, and which one (when not all). Maybe your code falls back to default color (or dark) and you set just one channel of RGB and the color is "wrong".
To get "blue to violet" colors you probably want something like: Color(0,0,0) -> Color(0,0,255) -> Color(128,0,255)
To do it 'over and over' you would use a millis() timer to time each step and use global or static variables to keep track of where in the sequence you are.
ok, sorry for the complicated report. i would like a led (no. 76) to change color automatically in a rainbow. But I can only let all the colors run. how can I do that, but only the colors blue to violet and blue to violet again etc. run through.
if I set the values myself, there are unclean transitions.
I want to achieve that, but only with various blue and purple...
Assuming you have a button connected to pin 2 and +5V and you have a pull down resistor connected to pin 2, as your setup suggests, the following should run the for-loop until you press the button.
while (digitalRead(2)) {
// Your `for`-loop here.
}
If you do not have a pull down resistor connected to pin 2, then I would suggest to enable the internal pull-up resistor,
void setup() {
pinMode(2, INPUT_PULLUP);
// ...
}
connect the button to pin 2 and ground, and use the following test to see whether the button was pressed.
while (not digitalRead(2)) {
// Your `for`-loop here.
}
If you put all of this in setup, then it will run until the button is pressed and then never again (at least not until a reboot).