const int PIN_RED = 9; const int PIN_GREEN = 10; const int PIN_BLUE = 11; int red = 254; int green = 1; int blue = 127; int red_direction = -1; int green_direction = 1; int blue_direction = -1; void setColor(int R, int G, int B) { analogWrite(PIN_RED, R); analogWrite(PIN_GREEN, G); analogWrite(PIN_BLUE, B); } void setup() { pinMode(PIN_RED, OUTPUT); pinMode(PIN_GREEN, OUTPUT); pinMode(PIN_BLUE, OUTPUT); } void loop() { red = red + red_direction; green = green + green_direction; blue = blue + blue_direction; if (red >= 255 || red = 255 || green = 255 || blue