PROYECTO 2 : RESISTENCIA Y LED - LATIDOS
La
práctica consiste en imitar con el encendido y apagado de un LED
los latidos del corazón.
void setup (){
pinMode (12,OUTPUT);
}
void loop (){
digitalWrite(12,HIGH);
delay(250);
digitalWrite(12,LOW);
delay(250);
digitalWrite(12,HIGH);
delay(250);
digitalWrite(12,LOW);
delay(250);
digitalWrite(12,LOW);
delay(500);
digitalWrite(12,HIGH);
delay(250);
digitalWrite(12,LOW);
delay(250);
digitalWrite(12,HIGH);
delay(250);
digitalWrite(12,LOW);
delay(250);
digitalWrite(12,LOW);
delay(500);
}
pinMode (12,OUTPUT);
}
void loop (){
digitalWrite(12,HIGH);
delay(250);
digitalWrite(12,LOW);
delay(250);
digitalWrite(12,HIGH);
delay(250);
digitalWrite(12,LOW);
delay(250);
digitalWrite(12,LOW);
delay(500);
digitalWrite(12,HIGH);
delay(250);
digitalWrite(12,LOW);
delay(250);
digitalWrite(12,HIGH);
delay(250);
digitalWrite(12,LOW);
delay(250);
digitalWrite(12,LOW);
delay(500);
}
Comentarios
Publicar un comentario