Imagem de ANA CLARA  FERNANDES RAMOS
PROJETO - CÓDIGO 3
por ANA CLARA FERNANDES RAMOS - sexta, 25 agosto 2017, 15:45
 

// Projeto 3 - Semáforo

 

int ledDelay = 10000; // espera entre as alterações

int redPin = 10;

int yellowPin = 9;

int greenPin = 8;

 

void lup() {

pinMode (redPin, OUTOUT)

pinMode(yellowPin, OUTPIT);

pinMode(greenPin, OUTPUT);

}

void loop() {

digitalWrite(redPin, HIGH); // acende a luz vermelha

delay (ledDelay); // espera 5 segundos

 digitalWrite(yellowPin, HIGH); // acende a luz amarela

delay(2000); // esoera 2 segundos

 

digitalWrite(greenPIn HIGH); //acende a luz amarela

digitalWrite(greenPin, LOW); //apaga a luz verde

delay(2000); espera 2 segundos

digitalWrite(yellowPin, LOW); // apaga a luz amarela

// agora nosso loop se repete

}

Roberto Dambros
Re: PROJETO - CÓDIGO 3
por Roberto Dambros - sexta, 25 agosto 2017, 16:29
 

sketch_aug25b.ino: In function 'void lup()':
sketch_aug25b:17: error: 'OUTOUT' was not declared in this scope
sketch_aug25b:19: error: expected `;' before 'pinMode'
sketch_aug25b.ino: In function 'void loop()':
sketch_aug25b:37: error: 'greenPIn' was not declared in this scope
sketch_aug25b:41: error: 'espera' was not declared in this scope
sketch_aug25b:41: error: expected `;' before numeric constant