Practicasdearduinobasicas 141008115306 Conversion Gate01

TECNOLOGICO NACIONAL DE MÉXICO Materia: Instrumentación Virtual Alumno: Perez Espinal Jorge Adrian Grupo: 7M1 PRACTIC

Views 149 Downloads 1 File size 1MB

Report DMCA / Copyright

DOWNLOAD FILE

Recommend stories

Citation preview

TECNOLOGICO NACIONAL DE MÉXICO Materia: Instrumentación Virtual

Alumno: Perez Espinal Jorge Adrian Grupo: 7M1

PRACTICA 1 Objetivo Utilizando Arduino y uno de sus ejemplos que se encuentran en su programa como su lenguaje de programación hacer que un led o diodo emisor de luz se encienda y apague en un periodo de 100 Mili segundos utilizando una práctica ya predeterminada que trae nuestro programa arduino, siguiendo el siguiente programa:

/* Ejemplo de encendido y apagado de un LED */// Se define el Pin 13 donde se conectara el LED int led = 13; // Se inicializa el Pin digital como una salida void setup() { pinMode(led, OUTPUT); } // Se crea una funcion ciclo donde se enciende y apaga el LED // cada segundo. void loop() { digitalWrite(led, HIGH); // Se enciende el LED delay(100);

// se espera un segundo

digitalWrite(led, LOW); delay(100); }

// Se apaga el LED

// se espera un segundo

Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Para realizar dicha programación y funcionamiento de nuestro programa nos basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos ya antes mostrado, en la pestaña ARCHIVO, posterior mente en la sub ventana EJEMPLOS, 01.BASICS y abriremos la que dice BLINK, abrirá la practica que utilizaremos y posterior mente para realizar el funcionamiento predeterminado cambiaremos a 100 el valor de 1000 de los delay que se encuentran hasta el final de nuestro programa, verificaremos nuestro programa para ver que no tenga ningún error y si este funciona perfecta mente lo cargaremos a nuestro arduino. Posterior mente llevaremos a cabo el montado y conectado de nuestra rotoboard con arduino y cada uno de sus componente ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 2 Objetivo Utilizando Arduino y uno de sus ejemplos que se encuentran en su programa como su lenguaje de programación hacer que un led o diodo emisor de luz se encienda y apague en un periodo de 10 Mili segundos utilizando una practica ya predeterminada que trae nuestro programa arduino, siguiendo el siguiente programa:

/* Ejemplo de encendido y apagado de un LED */// Se define el Pin 13 donde se conectara el LED int led = 13; // Se inicializa el Pin digital como una salida void setup() { pinMode(led, OUTPUT); } // Se crea una funcion ciclo donde se enciende y apaga el LED // cada segundo. void loop() { digitalWrite(led, HIGH); // Se enciende el LED delay(10);

// se espera un segundo

digitalWrite(led, LOW); delay(10); }

// Se apaga el LED

// se espera un segundo

Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Para realizar dicha programación y funcionamiento de nuestro programa nos basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos ya antes mostrado, en la pestaña ARCHIVO, posterior mente en la sub ventana EJEMPLOS, 01.BASICS y abriremos la que dice BLINK, abrirá la practica que utilizaremos y posterior mente para realizar el funcionamiento predeterminado cambiaremos a 10 el valor de 1000 de los delay que se encuentran hasta el final de nuestro programa, verificaremos nuestro programa para ver que no tenga ningún error y si este funciona perfecta mente lo cargaremos a nuestro arduino. Posterior mente llevaremos a cabo el montado y conectado de nuestra rotoboard con arduino y cada uno de sus componente ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 3 Objetivo Utilizando Arduino y uno de sus ejemplos que se encuentran en su programa como su lenguaje de programación hacer que un led o diodo emisor de luz se encienda un tiempo de 1000 mili segundos y apague en un periodo de 100 Mili segundos utilizando una practica ya predeterminada que trae nuestro programa arduino, siguiendo el siguiente programa:

/* Ejemplo de encendido y apagado de un LED */// Se define el Pin 13 donde se conectara el LED int led = 13; // Se inicializa el Pin digital como una salida void setup() { pinMode(led, OUTPUT); } // Se crea una funcion ciclo donde se enciende y apaga el LED // cada segundo. void loop() { digitalWrite(led, HIGH); // Se enciende el LED delay(1000);

// se espera un segundo

digitalWrite(led, LOW); delay(100); }

// Se apaga el LED

// se espera un segundo

Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Para realizar dicha programación y funcionamiento de nuestro programa nos basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos ya antes mostrado, en la pestaña ARCHIVO, posterior mente en la sub ventana EJEMPLOS, 01.BASICS y abriremos la que dice BLINK, abrirá la práctica que utilizaremos y posterior mente para realizar el funcionamiento predeterminado aremos un ajuste en el tiempo, para que nuestro led Eneida por un periodo de 1000 mili segundos y apague a los 100 mili segundos, este ajuste lo realizaremos cambiando el valor de 1000 de los delay que se encuentran hasta el final de nuestro programa, verificaremos nuestro programa para ver que no tenga ningún error y si este funciona perfecta mente lo cargaremos a nuestro arduino. Posterior mente llevaremos a cabo el montado y conectado de nuestra protoboard con arduino y cada uno de sus componente ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 4 Objetivo Utilizando Arduino y uno de sus ejemplos que se encuentran en su programa como su lenguaje de programación hacer que un led o diodo emisor de luz se encienda un tiempo de 100 mili segundos y apague en un periodo de 1000 Mili segundos utilizando una practica ya predeterminada que trae nuestro programa arduino, siguiendo el siguiente programa:

/* Ejemplo de encendido y apagado de un LED */// Se define el Pin 13 donde se conectara el LED int led = 13; // Se inicializa el Pin digital como una salida void setup() { pinMode(led, OUTPUT); } // Se crea una funcion ciclo donde se enciende y apaga el LED // cada segundo. void loop() { digitalWrite(led, HIGH); // Se enciende el LED delay(100);

// se espera un segundo

digitalWrite(led, LOW); delay(1000); }

// Se apaga el LED

// se espera un segundo

Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Para realizar dicha programación y funcionamiento de nuestro programa nos basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos ya antes mostrado, en la pestaña ARCHIVO, posterior mente en la sub ventana EJEMPLOS, 01.BASICS y abriremos la que dice BLINK, abrirá la practica que utilizaremos y posterior mente para realizar el funcionamiento predeterminado aremos un ajuste en el tiempo, para que nuestro led Eneida por un periodo de 1000 mili segundos y apague a los 1000 mili segundos, este ajuste lo realizaremos cambiando el valor de 100 de los delay que se encuentran hasta el final de nuestro programa, verificaremos nuestro programa para ver que no tenga ningún error y si este funciona perfecta mente lo cargaremos a nuestro arduino. Posterior mente llevaremos a cabo el montado y conectado de nuestra rotoboard con arduino y cada uno de sus componente ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 5 Objetivo Utilizando Arduino y uno de sus ejemplos que se encuentran en su programa como su lenguaje de programación como ya antes realizado en las practicas hacer que un led parpadee 10 veces y posterior mente se quede encendido, que se apague y vuela a hacer la misma función desde un principio utilizando una práctica ya predeterminada que trae nuestro programa arduino, siguiendo el siguiente programa:

// Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13;

// the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); }

// the loop routine runs over and over again forever: void loop() {

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000);

// wait for a second

digitalWrite(led, LOW); delay(1000);

// turn the LED off by making the voltage LOW

// wait for a second

digitalWrite(led,HIGH);

delay(1000); digitalWrite(led,LOW); delay(1000);

digitalWrite(led,HIGH); delay(1000); digitalWrite(led,LOW); delay(1000);

digitalWrite(led,HIGH); delay(1000); digitalWrite(led,LOW); delay(1000);

digitalWrite(led,HIGH); delay(1000); digitalWrite(led,LOW); delay(1000);

digitalWrite(led,HIGH); delay(1000); digitalWrite(led,LOW); delay(1000);

digitalWrite(led,HIGH); delay(1000); digitalWrite(led,LOW); delay(1000);

digitalWrite(led,HIGH); delay(1000); digitalWrite(led,LOW); delay(1000);

digitalWrite(led,HIGH); delay(1000); digitalWrite(led,LOW); delay(1000);

digitalWrite(led,HIGH); delay(1000); digitalWrite(led,LOW); delay(1000);

// Queda apagado en un tiempo de 1 min. digitalWrite(led,HIGH); delay(60000); }

Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Para realizar dicha programación y funcionamiento de nuestro programa nos basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos ya antes mostrado, en la pestaña ARCHIVO, posterior mente en la sub ventana EJEMPLOS, 01.BASICS y abriremos la que dice BLINK, abrirá la practica que utilizaremos y posterior mente para realizar el funcionamiento predeterminado aremos un ajuste en los encendidos y apagados de nuestro programa, poniendo diez de estos para que nuestro led haga la función de parpadear por 10 tiempos, esto con un debido tiempo de ciertos mili segundos para que no sea tan tardado, para al final de nuestro programa agregar una línea con un encendido permanente de 1 minuto, para que cuando este termine se inicie nueva mente nuestro programa, haciendo un ciclo para cumplirse el objetivo de nuestra practica, todo esto cambiando el valor de delay que se encuentran hasta el final de nuestras líneas de encendido y apagado del programa, verificaremos nuestro programa para ver que no tenga ningún error y si este funciona perfecta mente lo cargaremos a nuestro arduino. Posterior mente llevaremos a cabo el montado y conectado de nuestra rotoboard con arduino y cada uno de sus componente ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 6 Objetivo Utilizando Arduino y uno de sus ejemplos que se encuentran en su programa como su lenguaje de programación como ya antes realizado en las practicas hacer que un led parpadee 20 veces y posterior mente se quede encendido, que se apague y vuelva a hacer la misma función desde un principio utilizando una práctica ya predeterminada que trae nuestro programa arduino, siguiendo el siguiente programa:

int led = 13;

void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); }

// the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000);

digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW);

delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000);

digitalWrite(led, HIGH); delay(60000); }

Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Para realizar dicha programación y funcionamiento de nuestro programa nos basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos ya antes mostrado, en la pestaña ARCHIVO, posterior mente en la sub ventana EJEMPLOS, 01.BASICS y abriremos la que dice BLINK, abrirá la practica que utilizaremos y posterior mente para realizar el funcionamiento predeterminado aremos un ajuste en los encendidos y apagados de nuestro programa, poniendo veinte de estos para que nuestro led haga la función de parpadear por 20 tiempos, esto con un debido tiempo de ciertos mili segundos para que no sea tan tardado, para al final de nuestro programa agregar una línea con un encendido permanente de 1 minuto, para que cuando este termine se inicie nueva mente nuestro programa, haciendo un ciclo para cumplirse el objetivo de nuestra practica, todo esto cambiando el valor de delay que se encuentran hasta el final de nuestras líneas de encendido y apagado del programa, verificaremos nuestro programa para ver que no tenga ningún error y si este funciona perfecta mente lo cargaremos a nuestro arduino. Posterior mente llevaremos a cabo el montado y conectado de nuestra rotoboard con arduino y cada uno de sus componente ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 7 Objetivo Utilizando Arduino y uno de sus ejemplos que se encuentran en su programa como su lenguaje de programación como ya antes realizado en las practicas hacer que un led encienda por un tiempo de 2000, después en 1000, uno más en 100 y por último en 10 mili segundos, claro al terminar cada uno de estos se apague y se vuelva a encender con el cambio de tiempo, cuando este termine se apague y vuelva a hacer la misma función desde un principio utilizando una práctica ya predeterminada que trae nuestro programa arduino, siguiendo el siguiente programa:

int led = 13;

void setup() { pinMode(led, OUTPUT); }

void loop() { //Empieza la funcion digitalWrite(led, HIGH); delay(2000); digitalWrite(led,LOW); delay(1000);

digitalWrite(led, HIGH); delay(1000); digitalWrite(led,LOW); delay(1000);

digitalWrite(led, HIGH); delay(100); digitalWrite(led,LOW); delay(1000);

digitalWrite(led, HIGH); delay(10); digitalWrite(led,LOW); delay(1000);

//Momento en el que se da un tiempo de un minuto apagado digitalWrite(led,LOW); delay(60000); }

Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Para realizar dicha programación y funcionamiento de nuestro programa nos basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos ya antes mostrado, en la pestaña ARCHIVO, posterior mente en la sub ventana EJEMPLOS, 01.BASICS y abriremos la que dice BLINK, abrirá la practica que utilizaremos y posterior mente para realizar el funcionamiento predeterminado aremos un ajuste en los encendidos y apagados de nuestro programa para que este realice el encienda por un tiempo de 2000, después en 1000, uno más en 100 y por último en 10 mili segundos, claro al terminar cada uno de estos se apague y se vuelva a encender con el cambio de tiempo, haciendo un ciclo para cumplirse el objetivo de nuestra practica, todo esto cambiando el valor de delay que se encuentran hasta el final de nuestras líneas de encendido y apagado del programa, verificaremos nuestro programa para ver que no tenga ningún error y si este funciona perfecta mente lo cargaremos a nuestro arduino. Posterior mente llevaremos a cabo el montado y conectado de nuestra rotoboard con arduino y cada uno de sus componente ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 8 Objetivo Utilizando Arduino y uno de sus ejemplos que se encuentran en su programa como su lenguaje de programación habilitar el pin 12 y hacer que el led o diodo emisor de luz se encienda un tiempo de 100 mili segundos y que el diodo conectado al ya habilitado pin13 lo haga a los 2000 mili segundos, el tiempo de apagado es total mente libre para realizar la programación, esto se realizara con la ya mencionada practica ya predeterminada que trae nuestro programa arduino, siguiendo el siguiente programa:

// Encendido y apagado de 3 LEDs int ledPin1 = 13; // Define las salidas de los LED´s int ledPin2 = 12;

void setup() { // Configura las SALIDAS pinMode(ledPin1, OUTPUT); // declarar LEDs como SALIDAS pinMode(ledPin2, OUTPUT); digitalWrite(ledPin1, LOW); // Apaga los LEDs digitalWrite(ledPin2, LOW); } void loop(){ //Bucle de Funcionamiento digitalWrite(ledPin1, HIGH); // Apaga y enciende los leds cada 200 ms delay(2000); digitalWrite(ledPin1, LOW); digitalWrite(ledPin2, HIGH); delay(100); digitalWrite(ledPin2, LOW);

digitalWrite(ledPin1, HIGH); // Apaga y enciende los leds cada 200 ms delay(100);

digitalWrite(ledPin1, LOW); digitalWrite(ledPin2, HIGH); delay(2000); digitalWrite(ledPin2, LOW);

}

Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Para realizar dicha programación y funcionamiento de nuestro programa nos basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos ya antes mostrado, en la pestaña ARCHIVO, posterior mente en la sub ventana EJEMPLOS, 01.BASICS y abriremos la que dice BLINK, abrirá la practica que utilizaremos y posterior mente para realizar el funcionamiento predeterminado aremos un ajuste en el tiempo, pero primera mente debemos declarar la salida de nuestro pin 12 con un int y declarando en el void o bucle de funcionamiento el mismo proceso de apagado y encendido que ara nuestro funcionamiento de apagado y encendido, con la debida etiqueta que dara la salida al pin 13, ya echo esto aremos el cambio de tiempo en nuestras diferentes salidas 100 mili segundos en nuestro pin 12 y 2000 en nuestro pin 13 cambiando el delay que se encuentra hasta el final de nuestro programa, verificaremos nuestro programa para ver que no tenga ningún error y si este funciona perfecta mente lo cargaremos a nuestro arduino. Posterior mente llevaremos a cabo el montado y conectado de nuestra protoboard con arduino y cada uno de sus componente ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 9 Objetivo Utilizando Arduino y su lenguaje de programación realizar la practica de corrimiento de leds de por lo menos 5 leds diodos emisores de luz que valla de izquierda a derecha y que comience nueva mente de la izquierda yendo a la derecha, esto se realizara con el ya mencionado lenguaje de programación de arduino, siguiendo el siguiente programa:

// Encendido y apagado de 3 LEDs int ledPin1 = 13; // Define las salidas de los LED´s int ledPin2 = 8; int ledPin3 = 7; int ledPin4 = 4; int ledPin5 = 2; void setup() { // Configura las SALIDAS pinMode(ledPin1, OUTPUT); // declarar LEDs como SALIDAS

pinMode(ledPin2, OUTPUT); pinMode(ledPin3, OUTPUT); pinMode(ledPin4, OUTPUT); pinMode(ledPin5, OUTPUT); digitalWrite(ledPin1, LOW); // Apaga los LEDs digitalWrite(ledPin2, LOW); digitalWrite(ledPin3, LOW); digitalWrite(ledPin4, LOW); digitalWrite(ledPin5, LOW); } void loop(){ //Bucle de Funcionamiento digitalWrite(ledPin1, HIGH); // Apaga y enciende los leds cada 200 ms delay(500); digitalWrite(ledPin1, LOW); digitalWrite(ledPin2, HIGH); delay(500); digitalWrite(ledPin2, LOW); digitalWrite(ledPin3, HIGH); delay(500); digitalWrite(ledPin3, LOW); digitalWrite(ledPin4, HIGH); delay(500); digitalWrite(ledPin4, LOW); digitalWrite(ledPin5, HIGH); delay(500); digitalWrite(ledPin5, LOW); }

Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Para realizar dicha programación y funcionamiento de nuestro programa nos basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos ya antes mostrado, en la pestaña ARCHIVO, posterior mente en la sub ventana EJEMPLOS, 01.BASICS y abriremos la que dice BLINK, abrirá la practica que utilizaremos y posterior mente para realizar el funcionamiento predeterminado aremos un ajuste en dicho programa, pero primera mente debemos declarar nuestras salidas 2,4,7,8,13 dichos pines serán nuestras salidas que en la parte mas adelante con el void o bucle de funcionamiento realizara el mismo proceso de encendido y apagado de un led uno por uno, con la debida etiqueta que dara la salida a nuestros ya mencionados pines, según el criterio del programador se podrá cambiar el tiempo en nuestras diferentes salidas como en nuestras practicas anteriores, para continuar con nuestra practica verificaremos nuestro programa para ver que no tenga ningún error y si este funciona perfecta mente lo cargaremos a nuestro arduino.

Posterior mente llevaremos a cabo el montado y conectado de nuestra protoboard con arduino y cada uno de sus componentes ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 10 Objetivo Utilizando Arduino y su lenguaje de programación realizar la practica de corrimiento de leds de por lo menos 5 leds o diodos emisores de luz que valla de derecha a izquierda y que comience nueva mente de la derecha yendo a la izquierda, esto se realizara con el ya mencionado lenguaje de programación de arduino, siguiendo el siguiente programa:

// Encendido y apagado de 3 LEDs int ledPin1 = 2; // Define las salidas de los LED´s int ledPin2 = 4; int ledPin3 = 7; int ledPin4 = 8; int ledPin5 = 13; void setup() { // Configura las SALIDAS

pinMode(ledPin1, OUTPUT); // declarar LEDs como SALIDAS pinMode(ledPin2, OUTPUT); pinMode(ledPin3, OUTPUT); pinMode(ledPin4, OUTPUT); pinMode(ledPin5, OUTPUT); digitalWrite(ledPin1, LOW); // Apaga los LEDs digitalWrite(ledPin2, LOW); digitalWrite(ledPin3, LOW); digitalWrite(ledPin4, LOW); digitalWrite(ledPin5, LOW); } void loop(){ //Bucle de Funcionamiento digitalWrite(ledPin1, HIGH); // Apaga y enciende los leds cada 200 ms delay(500); digitalWrite(ledPin1, LOW); digitalWrite(ledPin2, HIGH); delay(500); digitalWrite(ledPin2, LOW); digitalWrite(ledPin3, HIGH); delay(500); digitalWrite(ledPin3, LOW); digitalWrite(ledPin4, HIGH); delay(500); digitalWrite(ledPin4, LOW); digitalWrite(ledPin5, HIGH); delay(500); digitalWrite(ledPin5, LOW); }

Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Para realizar dicha programación y funcionamiento de nuestro programa nos basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos ya antes mostrado, en la pestaña ARCHIVO, posterior mente en la sub ventana EJEMPLOS, 01.BASICS y abriremos la que dice BLINK, abrirá la practica que utilizaremos y posterior mente para realizar el funcionamiento predeterminado aremos un ajuste en dicho programa, pero primera mente debemos declarar nuestras salidas que a diferencia de la practica 9 declararemos nuestras salidas inversa mente 13,8,7,4,2 dichos pines serán nuestras salidas que en la parte mas adelante con el void o bucle de funcionamiento realizara el mismo proceso de encendido y apagado de un led uno por uno, con la debida etiqueta que dará la salida a nuestros ya mencionados pines, según el criterio del programador se podrá cambiar el tiempo en nuestras diferentes salidas como en nuestras practicas anteriores, para continuar con nuestra practica verificaremos nuestro programa

para ver que no tenga ningún error y si este funciona perfecta mente lo cargaremos a nuestro arduino. Posterior mente llevaremos a cabo el montado y conectado de nuestra protoboard con arduino y cada uno de sus componentes ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 11 Objetivo Con el mismo programa de corrimiento de leds o diodos emisores de luz realizar la programación para que de izquierda a derecha de los 5 leds solo se enciendan 1,3,5 y que comience nueva mente de la izquierda yendo a la derecha, esto se realizara con el ya mencionado lenguaje de programación de arduino, siguiendo el siguiente programa:

// Encendido y apagado de 3 LEDs int ledPin1 = 13; // Define las salidas de los LED´s int ledPin2 = 7; int ledPin3 = 2; void setup() { // Configura las SALIDAS pinMode(ledPin1, OUTPUT); // declarar LEDs como SALIDAS

pinMode(ledPin2, OUTPUT); pinMode(ledPin3, OUTPUT); digitalWrite(ledPin1, LOW); // Apaga los LEDs digitalWrite(ledPin2, LOW); digitalWrite(ledPin3, LOW); } void loop(){ //Bucle de Funcionamiento digitalWrite(ledPin1, HIGH); // Apaga y enciende los leds cada 200 ms delay(500); digitalWrite(ledPin1, LOW); digitalWrite(ledPin2, HIGH); delay(500); digitalWrite(ledPin2, LOW); digitalWrite(ledPin3, HIGH); delay(500); digitalWrite(ledPin3, LOW); } Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Llevaremos a cavo una modificación en nuestro programa ya sea de la practica 9 o 10, cualquiera de las dos, ya que estas practicas tienen la base para poder llevar a cavo nuestra practica numero 11 que consistirá del encendido solo de 3 led de 5 para esto de nuestros programas anteriores borraremos 2 salidas antes declaradas y dejaremos solo 3 que serán las encargadas de llevar a cavo nuestra función, declararemos nuestras salidas 13,7,2 dichos pines serán nuestras salidas que en la parte mas adelante con el void o bucle de funcionamiento realizara el mismo proceso de encendido y apagado de un led uno por uno, con la debida etiqueta que dará la salida a nuestros ya mencionados pines, según el criterio del

programador se podrá cambiar el tiempo en nuestras diferentes salidas como en nuestras practicas anteriores, para continuar con nuestra practica verificaremos nuestro programa para ver que no tenga ningún error y si este funciona perfecta mente lo cargaremos a nuestro arduino. Posterior mente llevaremos a cabo el montado y conectado de nuestra protoboard con arduino y cada uno de sus componentes ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 12 Objetivo Con el mismo programa de corrimiento de leds o diodos emisores de luz realizar la programación para que el encendido de nuestros leds se haga a la inversa de derecha a izquierda de los 5 leds que solo se encenderán 5,3,1 y que comience nueva mente de la derecha yendo a la izquierda, esto se realizara con el ya mencionado lenguaje de programación de arduino, siguiendo el siguiente programa:

// Encendido y apagado de 3 LEDs int ledPin1 = 2; // Define las salidas de los LED´s int ledPin2 = 7; int ledPin3 = 13;

void setup() { // Configura las SALIDAS pinMode(ledPin1, OUTPUT); // declarar LEDs como SALIDAS pinMode(ledPin2, OUTPUT); pinMode(ledPin3, OUTPUT); digitalWrite(ledPin1, LOW); // Apaga los LEDs digitalWrite(ledPin2, LOW); digitalWrite(ledPin3, LOW); } void loop(){ //Bucle de Funcionamiento digitalWrite(ledPin1, HIGH); // Apaga y enciende los leds cada 200 ms delay(500); digitalWrite(ledPin1, LOW); digitalWrite(ledPin2, HIGH); delay(500); digitalWrite(ledPin2, LOW); digitalWrite(ledPin3, HIGH); delay(500); digitalWrite(ledPin3, LOW); } Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Llevaremos a cavo una modificación en nuestro programa ya sea de la practica 9 o 10, cualquiera de las dos, ya que estas practicas tienen la base para poder llevar a cavo nuestra practica numero 11 que consistirá del encendido solo de 3 leds de 5 para esto de nuestros programas anteriores borraremos 2 salidas antes declaradas y dejaremos solo 3 que serán las encargadas de llevar a cavo nuestra función, declararemos nuestras salidas 2,7,13 dichos pines serán nuestras salidas

que en la parte mas adelante con el void o bucle de funcionamiento realizara el mismo proceso de encendido y apagado de un led uno por uno, con la debida etiqueta que dará la salida a nuestros ya mencionados pines, según el criterio del programador se podrá cambiar el tiempo en nuestras diferentes salidas como en nuestras practicas anteriores, para continuar con nuestra practica verificaremos nuestro programa para ver que no tenga ningún error y si este funciona perfecta mente lo cargaremos a nuestro arduino. Posterior mente llevaremos a cabo el montado y conectado de nuestra protoboard con arduino y cada uno de sus componentes ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 13 Objetivo Llevar a cavo la programación en arduino para juntar y hacer funcionar la practica 9,10,11 y 12 en un solo programa, que este funcione correcta mente y sin errores como fueron funcionando una por una separadas haciendo el corrimiento de leds de derecha a izquierda, viceversa y de derecha a izquierda solo los leds 1, 3, y 5 y por igual a la inversa para posterior mente comenzar de nuevo por la derecha, esto se realizara con el ya mencionado lenguaje de programación de arduino, siguiendo el siguiente programa:

// Encendido y apagado de 3 LEDs int ledPin1 = 13; // Define las salidas de los LED´s

int ledPin2 = 8; int ledPin3 = 7; int ledPin4 = 4; int ledPin5 = 2; void setup() { // Configura las SALIDAS pinMode(ledPin1, OUTPUT); // declarar LEDs como SALIDAS pinMode(ledPin2, OUTPUT); pinMode(ledPin3, OUTPUT); pinMode(ledPin4, OUTPUT); pinMode(ledPin5, OUTPUT); digitalWrite(ledPin1, LOW); // Apaga los LEDs digitalWrite(ledPin2, LOW); digitalWrite(ledPin3, LOW); digitalWrite(ledPin4, LOW); digitalWrite(ledPin5, LOW); } void loop(){ //Bucle de Funcionamiento digitalWrite(ledPin1, HIGH); // Apaga y enciende los leds cada 200 ms delay(500); digitalWrite(ledPin1, LOW); digitalWrite(ledPin2, HIGH); delay(500); digitalWrite(ledPin2, LOW); digitalWrite(ledPin3, HIGH); delay(500); digitalWrite(ledPin3, LOW); digitalWrite(ledPin4, HIGH); delay(500);

digitalWrite(ledPin4, LOW); digitalWrite(ledPin5, HIGH); delay(500); digitalWrite(ledPin5, LOW);

//Practica 10 digitalWrite(ledPin5, HIGH); // Apaga y enciende los leds cada 200 ms delay(500); digitalWrite(ledPin5, LOW); digitalWrite(ledPin4, HIGH); delay(500); digitalWrite(ledPin4, LOW); digitalWrite(ledPin3, HIGH); delay(500); digitalWrite(ledPin3, LOW); digitalWrite(ledPin2, HIGH); delay(500); digitalWrite(ledPin2, LOW); digitalWrite(ledPin1, HIGH); delay(500); digitalWrite(ledPin1, LOW);

//Practica 11 digitalWrite(ledPin1, HIGH); // Apaga y enciende los leds cada 200 ms delay(500); digitalWrite(ledPin1, LOW); digitalWrite(ledPin3, HIGH); delay(500);

digitalWrite(ledPin3, LOW); digitalWrite(ledPin5, HIGH); delay(500); digitalWrite(ledPin5, LOW);

//Practica 12 digitalWrite(ledPin5, HIGH); // Apaga y enciende los leds cada 200 ms delay(500); digitalWrite(ledPin5, LOW); digitalWrite(ledPin3, HIGH); delay(500); digitalWrite(ledPin3, LOW); digitalWrite(ledPin1, HIGH); delay(500); digitalWrite(ledPin1, LOW); }

Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Llevaremos a cavo una modificación en nuestro programa en base a la practica 9, juntándola con la 10, la 11 y la 12 haciendo el arreglo correcto y correspondiente para que se haga bien y sin problema el funcionamiento de nuestra practica que consistirá ya antes mencionado con el corrimiento de leds uno por uno de derecha a izquierda, a la inversa de esta, cuando termine que comience el encendido de los leds 1, 3 y 5 por igual de derecha a izquierda y cuando termine dicho proceso a la inversa de este. Para ello como en nuestra practica 9 o 10 declararemos nuestras 5 salidas y lo que influirá y realizara todo nuestro proceso para que se

cumpla nuestro objetivo tendrá que ver y hacerse en el void o bucle de funcionamiento que llevara toda la etapa de funcionamiento que realizara los uno por uno los diferentes procesos que se requieran para que no haya problem, con las debidas etiquetas que dará la salida a nuestros ya mencionados pines. Posterior mente llevaremos a cabo el montado y conectado de nuestra protoboard con arduino y cada uno de sus componentes ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 14 Objetivo Llevar a cavo la programación en arduino para juntar y hacer funcionar la practica 9,10,11 y 12 en un solo programa pero esta vez cambiaremos la velocidad de su frecuencia de encendido y apagado, que este funcione correcta mente y sin errores como fueron funcionando una por una separadas haciendo el corrimiento de leds de derecha a izquierda, viceversa y de derecha a izquierda solo los leds 1, 3, y 5 y por igual a la inversa para posterior mente comenzar de nuevo por la derecha, esto se realizara con el ya mencionado lenguaje de programación de arduino, siguiendo el siguiente programa:

// Encendido y apagado de 3 LEDs

int ledPin1 = 13; // Define las salidas de los LED´s int ledPin2 = 8; int ledPin3 = 7; int ledPin4 = 4; int ledPin5 = 2; void setup() { // Configura las SALIDAS pinMode(ledPin1, OUTPUT); // declarar LEDs como SALIDAS pinMode(ledPin2, OUTPUT); pinMode(ledPin3, OUTPUT); pinMode(ledPin4, OUTPUT); pinMode(ledPin5, OUTPUT); digitalWrite(ledPin1, LOW); // Apaga los LEDs digitalWrite(ledPin2, LOW); digitalWrite(ledPin3, LOW); digitalWrite(ledPin4, LOW); digitalWrite(ledPin5, LOW); } void loop(){ //Bucle de Funcionamiento digitalWrite(ledPin1, HIGH); // Apaga y enciende los leds cada 200 ms delay(100); digitalWrite(ledPin1, LOW); digitalWrite(ledPin2, HIGH); delay(100); digitalWrite(ledPin2, LOW); digitalWrite(ledPin3, HIGH); delay(100); digitalWrite(ledPin3, LOW); digitalWrite(ledPin4, HIGH);

delay(100); digitalWrite(ledPin4, LOW); digitalWrite(ledPin5, HIGH); delay(100); digitalWrite(ledPin5, LOW);

//Practica 10 digitalWrite(ledPin5, HIGH); // Apaga y enciende los leds cada 200 ms delay(100); digitalWrite(ledPin5, LOW); digitalWrite(ledPin4, HIGH); delay(100); digitalWrite(ledPin4, LOW); digitalWrite(ledPin3, HIGH); delay(100); digitalWrite(ledPin3, LOW); digitalWrite(ledPin2, HIGH); delay(100); digitalWrite(ledPin2, LOW); digitalWrite(ledPin1, HIGH); delay(100); digitalWrite(ledPin1, LOW);

//Practica 11 digitalWrite(ledPin1, HIGH); // Apaga y enciende los leds cada 200 ms delay(100); digitalWrite(ledPin1, LOW); digitalWrite(ledPin3, HIGH);

delay(100); digitalWrite(ledPin3, LOW); digitalWrite(ledPin5, HIGH); delay(100); digitalWrite(ledPin5, LOW);

//Practica 12 digitalWrite(ledPin5, HIGH); // Apaga y enciende los leds cada 200 ms delay(100); digitalWrite(ledPin5, LOW); digitalWrite(ledPin3, HIGH); delay(100); digitalWrite(ledPin3, LOW); digitalWrite(ledPin1, HIGH); delay(100); digitalWrite(ledPin1, LOW); }

Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Llevaremos a cavo una modificación en nuestro programa en base a la practica 9, juntándola con la 10, la 11 y la 12 haciendo el arreglo correcto y correspondiente para que se haga bien y sin problema el funcionamiento de nuestra practica que consistirá ya antes mencionado con el corrimiento de leds uno por uno de derecha a izquierda, a la inversa de esta, cuando termine que comience el encendido de los leds 1, 3 y 5 por igual de derecha a izquierda y cuando termine dicho proceso a la inversa de este. Para ello como en nuestra practica 9 o 10 declararemos nuestras 5 salidas y lo que influirá y realizara todo nuestro proceso para que se

cumpla nuestro objetivo tendrá que ver y hacerse en el void o bucle de funcionamiento que llevara toda la etapa de funcionamiento que realizara uno por uno los diferentes procesos que se requieran para que no haya problema, además de que cambiaremos la frecuencia de su velocidad con las debidas etiquetas que dará la salida a nuestros ya mencionados pines. Posterior mente llevaremos a cabo el montado y conectado de nuestra protoboard con arduino y cada uno de sus componentes ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 15 Objetivo Utilizando Arduino y su debido lenguaje de programación 5 leds, cada uno de ellos diez veces, con la misma frecuencia de nuestra practica 14, frecuencia que encenderá y apagara nuestros leds cada cierto periodo de tiempo, claro al terminar cada uno de estos se apague y se vuelva a encender y a hacer la misma función desde un principio utilizando una práctica ya predeterminada que trae nuestro programa arduino, siguiendo el siguiente programa:

// Pin 13 has an LED connected on most Arduino boards.

// give it a name: const int led = 13; const int led2 = 12; const int led3 = 8; const int led4 = 7; const int led5 = 4;

// the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); pinMode(led2, OUTPUT); pinMode(led3, OUTPUT); pinMode(led4, OUTPUT); pinMode(led5, OUTPUT); }

// Prac. 9 the loop routine runs over and over again forever: void loop() { // led1 digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led, OUTPUT);

// led2 digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW);

// turn the LED off by making the voltage LOW

delay(150);

// wait for a second

pinMode(led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level)

delay(1500);

// wait for a second

digitalWrite(led2, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led2, OUTPUT);

//led3 digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3, OUTPUT);

//led4 digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW);

// turn the LED off by making the voltage LOW

delay(150);

// wait for a second

pinMode(led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level)

delay(1500);

// wait for a second

digitalWrite(led4, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led4, OUTPUT);

//led5 digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5, OUTPUT);

// pract.10 led5

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode (led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode (led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode (led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode (led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode (led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode (led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode (led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode (led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode (led5, OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode (led5, OUTPUT);

//led4 digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW); delay(150); pinMode (led4, OUTPUT);

// turn the LED off by making the voltage LOW

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led4, OUTPUT);

digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led4, LOW); delay(150); pinMode (led4, OUTPUT);

//led3

// turn the LED off by making the voltage LOW

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

pinMode (led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led3, OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led3, OUTPUT);

//led2 digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW); delay(150); pinMode (led2, OUTPUT);

// turn the LED off by making the voltage LOW

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led2, OUTPUT);

digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led2, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led2, OUTPUT);

//led digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150); pinMode (led, OUTPUT);

// turn the LED off by making the voltage LOW

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

pinMode (led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led, OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW);

// turn the LED off by making the voltage LOW

delay(150); pinMode (led, OUTPUT);

// pract.11 led digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)

delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

//led3 digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

//led5 digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW);

// turn the LED off by making the voltage LOW

delay(150);

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW);

// turn the LED off by making the voltage LOW

delay(150);

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level)

delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

// pract.12 led5 digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

digitalWrite(led5, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led5, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led5,OUTPUT);

//led3 digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW);

// turn the LED off by making the voltage LOW

delay(150);

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led3, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led3,OUTPUT);

//led digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT);

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1500);

// wait for a second

digitalWrite(led, LOW); delay(150);

// turn the LED off by making the voltage LOW

// wait for a second

pinMode(led,OUTPUT); }

Desarrollo Para la correcta programación y funcionamiento de esta práctica se utilizaran: -

Arduino uno Protoboard Leds Cables

Llevaremos a cavo una modificación en nuestro programa en base a la practica 14, mediante la programación de esta y añadiendo mas líneas a nuestro programa aremos que 5 leds ya antes dispuestos y configurados en dicha practica 14

enciendan cada uno de ellos 10 veces, al hacer esto cada uno saltara al siguiente, al siguiente y al siguiente hasta terminar y vuelva a iniciar nuestro programa desde sus primeras línea. Para ello se llevara a cabo la modificación de nuestra practica 14 y fusionando parte de la 6 o 5 ya dependiendo el gusto de cada quien, para declarar nuestras 5 salidas para que se influya y realice todo nuestro proceso para que se cumpla nuestro objetivo tendrá que ver y hacerse en el void o bucle de funcionamiento que llevara toda la etapa de funcionamiento que realizara uno por uno los diferentes procesos que se requieran para que no haya problema, además de que cambiaremos la frecuencia de su velocidad con las debidas etiquetas que dará la salida a nuestros ya mencionados pines. Posterior mente llevaremos a cabo el montado y conectado de nuestra rotoboard con arduino y cada uno de sus componentes ara que esta pueda funcionar adecuada mente, dándonos como resultado la siguiente imagen:

Practica 16 Objetivo Este ejercicio deberá realizar un rayo de luz que valla de derecha a izquierda, o más poéticamente, una estrella fugaz, moviéndose a través de una línea de LEDs. Podremos configurar tanto la velocidad de la estrella, así como la longitud de la cola. No es muy elegante porque la cola brilla con la misma intensidad que la estrella, y al final, parecerá como si un rayo sólido cruzase la línea de LED-s, esto se realizara con el ya mencionado lenguaje de programación de arduino, siguiendo el siguiente programa: // Variable declaración // Declaración de los PIN-es mediante un array

int pinArray [] = { 2,3,4,5,6,7,8,9,10,11, }; int controlLed = 12; // LED de control int waitNextLed = 100; // Tiempo antes de encender el siguiente LED // Número de LED-s que permanecen encendidos antes de empezar a apagarlos para //formar la cola int tailLength = 4; // Número de LED-s conectados (que es también el tamaño del array) int lineSize = 10; void setup() // Configuración de los PIN-es como salida digital { int i; pinMode (controlLed, OUTPUT); for (i=0; i< lineSize; i++) { pinMode(pinArray[i], OUTPUT); } } void loop() { int i; // Se establece la longitud de la cola en un contador int tailCounter = tailLength; // Se enciende el LED de control para indicar el inicio del loop digitalWrite(controlLed, HIGH); for (i=0; i 0) tailCounter--; } for (i=(lineSize-tailLength); i