int redPin= 8; // blue int greenPin = 10; //redish pink int bluePin = 9; //yellow void setup() { // put your setup code here, to run once: pinMode(redPin, OUTPUT); pinMode(greenPin, OUTPUT); pinMode(bluePin, OUTPUT); } void loop() { // put your main code here, to run repeatedly: setColor(255, 0, 0); // Red Color delay(500); setColor(0, 255, 0); // Green Color delay(500); setColor(0, 0, 255); // Blue Color delay(500); setColor(255, 255, 255); // White Color delay(500); setColor(0, 0, 0); // No color delay(500); } void setColor(int redValue, int greenValue, int blueValue) { analogWrite(redPin, 255-redValue); analogWrite(greenPin, 255-greenValue); analogWrite(bluePin, 255-blueValue); }