//Projeto 3 - Semáforo
int ledDelay=10000; //espera entre as alterações
int redPin= 10;
int yellowPin = 9;
int greenPin = 8;
void setup() {
pinMode(redpin, OUTPUT);
pinMode(yellow, UOTPUT);
pinMode(greenPin, OUTPUT);
}
void loop() {
digitalWrite(redPin, HIGH); //acende a luz vermalha
deplay(ledDelay //espera 5 segundos
digitalWrite(yellowPin, HIGH) //acende a luz amarela
delay(2000) //espera 2 segundos
digitalWrite(greenPin, HIGH); //apaga a luz verde
digitalWrite(redPin, LOW); //apagar a luz vermelha
digitalWrite(yellowPin, LOW); //apaga a luz amarela
delay(2000); //espera 2 segundos
digitalWrite(yellowPin, HIGH); //acender a luz amarela
digitalWrite(greenPin, LOW); //apagar a luz verde
delay(2000); //esperar 2 segundos
digitalWrite(yellowPin, LOW); //apagar a luz amarela
//agora nosso loop se repete
}