En esta practica hemos conectado el puerto 10 y 13, para que los leds se enciendan y apaguen intermitentemente. Este es el programa que hemos realizado:
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(13, OUTPUT);
pinMode(10, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(10, LOW); // turn the LED off by making the voltage LOW
delay(500); // wait for a second
digitalWrite(13, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(10, HIGH); // turn the LED off by making the voltage LOW
delay(500);
}
A continuación adjunto una foto y video de prueba:
No hay comentarios:
Publicar un comentario