// constants (or #define with no ; at end of line) won't change. They're used here to set pin numbers:
int redLED = 11;
int greenLED = 10;
int blueLED = 9;
String myColour = "";
String msg="What colour LED? ";
// Variables will change:
void setup() {
pinMode (redLED, OUTPUT);
pinMode (greenLED, OUTPUT);
pinMode (blueLED, OUTPUT);
Serial.begin(9600);
}
void loop() {
for (int r=0; r<=255; r=r+10){
for (int g=0; g<=255; g=g+10){
for (int b=0; b<=255; b=b+10){
analogWrite(blueLED, b);
analogWrite(greenLED, g);
analogWrite(redLED, r);
Serial.print(r);
Serial.print(", ");
Serial.print(g);
Serial.print(", ");
Serial.println(b);
}
}
}
}