void setup() {
// put your setup code here, to run once:
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
}
void setColor(int redValue, int greenValue, int blueValue) {
30 analogWrite(1, redValue);
31 analogWrite(2, greenValue);
32 analogWrite(3, blueValue);
33}
void loop() {
// put your main code here, to run repeatedly:
setColor(255, 0, 0); // Red Color
delay(1000);
setColor(0, 255, 0); // Green Color
delay(1000);
setColor(0, 0, 255); // Blue Color
delay(1000);
setColor(255, 255, 255); // White Color
delay(1000);
setColor(170, 0, 255); // Purple Color
delay(1000);
setColor(127, 127, 127); // Light Blue
delay(1000);
}