// variables
const int pinled = 6;
int delaytime = 5000;
const int pinled1 = 11;
int delaytime1 = 1000;
const int pinled2 = 9;
void setup() {
// put your setup code here, to run once:
pinMode(pinled, OUTPUT);
pinMode(pinled1, OUTPUT);
pinMode(pinled2, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
// luz roja
analogWrite(pinled, 100);
delay(delaytime);
analogWrite(pinled, 0);
delay(delaytime1);
// Luz amarrilla
analogWrite(pinled1, 120);
delay(delaytime);
analogWrite(pinled1, 0);
delay(delaytime1);
// luz verde
digitalWrite(pinled2, HIGH);
delay(delaytime);
analogWrite(pinled2, 50);
delay(delaytime1);
}