/* Blink con 2 led habacuc.electronics@gmail.com habacucelectronics.blogspot.com */ #define LED 2 //Le damos un nombre a nuestro pin 2. #define LED2 3 //Le damos un nombre a nuestro pin 3. void setup() { pinMode(LED, OUTPUT); //Definimos el pin LED como salida. pinMode(LED2, OUTPUT); //Definimos el pin LED2 como salida. } // la función de bucle se repite una y otra vez por siempre void loop() { digitalWrite(LED,HIGH); //Mandamos un Alto al LED digitalWrite(LED2,HIGH); //Mandamos un Alto al LED2 delay(1000); digitalWrite(LED,LOW); //Mandamos un Bajo al LED digitalWrite(LED2,LOW); delay(1000); }
MATERIALES
1 ARDUINO
2 Led 5mm
2 Resistencia 220 ohm
Protoboard
Jumpers
CIRCUITO
Comentario Blogger
Comentario Facebook