#define PIN_RED 11
#define PIN_GREEN 10
#define PIN_BLUE 9
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
for(int i=0; i<255; i++)
{
analogWrite(PIN_RED, i);
Serial.println(i);
delay(20);
}
analogWrite(PIN_RED, 0);
for(int i=0; i<255; i++)
{
analogWrite(PIN_GREEN, i);
Serial.println(i);
delay(20);
}
analogWrite(PIN_GREEN, 0);
for(int i=0; i<255; i++)
{
analogWrite(PIN_BLUE, i);
Serial.println(i);
delay(20);
}
analogWrite(PIN_BLUE, 0);
}