const byte kirmizi=8, mavi=9, yesil=10;
byte x, y = 0;
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
if (y == 0) {
x = x + 225;
analogWrite(kirmizi, x);
delay(1000);
}
if (x == 255) {
y = y - 225;
analogWrite(kirmizi, y);
delay(1000);
}
if (y == 0) {
x = x + 225;
analogWrite(yesil, x);
delay(1000);
}
}