Imagem de ANA CLARA  FERNANDES RAMOS
CÓDIGO - PROJETO 2
por ANA CLARA FERNANDES RAMOS - sexta, 25 agosto 2017, 16:05
 

// LED conectado ao pino 10

int ledpin = 10;

// executa uma vez, quando o sketch inicia

void setup() {

 //define o pino como saída

pinMode(ledPin, OUTPUT);

}

//executa repetidas vezes

voidloop() {

// 3 pontos

for (int x=0;  x<3; x++) {

digitalWrite(ledPin, HIGH)00; acende o LED

Delay(150); //espera 150ms

digitalWrite(ledPin LOW); // apaga o LED

delay(100), //espera 100ms

}

// espera 100ms para marcar o intervalo entre as letras

delay(100) //espera 100ms

}

//espera 100ms para marcar para marcar o intervalo entre as letras

//3 pontos novamente

for (int x=0; x++) {

digitalWrite
(ledPin, HIGH); //acende LED

delay(150); //espera 100ms

digitalWrite(ledPin, LOW); //apaga o LED

delay(100); //espera 100ms

}

// espera 5 segundos antes de repetir o sinal SOS

delay(5000);

}

Roberto Dambros
Re: CÓDIGO - PROJETO 2
por Roberto Dambros - segunda, 11 setembro 2017, 08:47
 

sketch_sep11a.ino: In function 'void setup()':
sketch_sep11a:11: error: 'ledPin' was not declared in this scope
sketch_sep11a.ino: At global scope:
sketch_sep11a:17: error: ISO C++ forbids declaration of 'voidloop' with no type
sketch_sep11a.ino: In function 'int voidloop()':
sketch_sep11a:23: error: 'ledPin' was not declared in this scope
sketch_sep11a:23: error: expected `;' before numeric constant
sketch_sep11a:23: error: 'acende' was not declared in this scope
sketch_sep11a:23: error: expected `;' before 'o'
sketch_sep11a:27: error: expected `)' before numeric constant
sketch_sep11a:31: error: expected primary-expression before '}' token
sketch_sep11a:31: error: expected `;' before '}' token
sketch_sep11a:37: error: expected `;' before '}' token
sketch_sep11a.ino: At global scope:
sketch_sep11a:43: error: expected unqualified-id before 'for'
sketch_sep11a:43: error: expected constructor, destructor, or type conversion before '++' token
sketch_sep11a:58: error: expected constructor, destructor, or type conversion before '(' token
sketch_sep11a:60: error: expected declaration before '}' token