You are on page 1of 93

TECNOLOGICO NACIONAL DE

MXICO
Materia: Instrumentacin 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 programacin hacer que un led o diodo emisor de luz se
encienda y apague en un periodo de 100 Mili segundos utilizando una prctica 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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Para realizar dicha programacin y funcionamiento de nuestro programa nos


basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos
ya antes mostrado, en la pestaa 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
ningn 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, dndonos 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 programacin 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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Para realizar dicha programacin y funcionamiento de nuestro programa nos


basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos
ya antes mostrado, en la pestaa 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
ningn 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, dndonos 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 programacin 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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Para realizar dicha programacin y funcionamiento de nuestro programa nos


basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos
ya antes mostrado, en la pestaa ARCHIVO, posterior mente en la sub ventana
EJEMPLOS, 01.BASICS y abriremos la que dice BLINK, abrir la prctica 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 ningn
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, dndonos 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 programacin 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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Para realizar dicha programacin y funcionamiento de nuestro programa nos


basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos
ya antes mostrado, en la pestaa 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 ningn 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, dndonos 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 programacin 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 funcin desde un principio utilizando una prctica
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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Para realizar dicha programacin y funcionamiento de nuestro programa nos


basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos
ya antes mostrado, en la pestaa 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 funcin 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 lnea 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
lneas de encendido y apagado del programa, verificaremos nuestro programa
para ver que no tenga ningn 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, dndonos 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 programacin 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 funcin desde un principio utilizando una
prctica 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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Para realizar dicha programacin y funcionamiento de nuestro programa nos


basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos
ya antes mostrado, en la pestaa 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 funcin 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 lnea 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
lneas de encendido y apagado del programa, verificaremos nuestro programa
para ver que no tenga ningn 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, dndonos 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 programacin como ya antes realizado en las practicas hacer
que un led encienda por un tiempo de 2000, despus en 1000, uno ms 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 funcin desde un principio utilizando una prctica 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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Para realizar dicha programacin y funcionamiento de nuestro programa nos


basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos
ya antes mostrado, en la pestaa 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, despus en 1000, uno ms 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 lneas de encendido y apagado del
programa, verificaremos nuestro programa para ver que no tenga ningn 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, dndonos 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 programacin 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 programacin, 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 LEDs
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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Para realizar dicha programacin y funcionamiento de nuestro programa nos


basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos
ya antes mostrado, en la pestaa 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 ningn 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, dndonos como resultado la siguiente imagen:

Practica 9
Objetivo
Utilizando Arduino y su lenguaje de programacin 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 programacin de
arduino, siguiendo el siguiente programa:

// Encendido y apagado de 3 LEDs


int ledPin1 = 13; // Define las salidas de los LEDs
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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Para realizar dicha programacin y funcionamiento de nuestro programa nos


basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos
ya antes mostrado, en la pestaa 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 sern 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, segn 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 ningn 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, dndonos como resultado la siguiente imagen:

Practica 10
Objetivo
Utilizando Arduino y su lenguaje de programacin 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 programacin de
arduino, siguiendo el siguiente programa:

// Encendido y apagado de 3 LEDs


int ledPin1 = 2; // Define las salidas de los LEDs
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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Para realizar dicha programacin y funcionamiento de nuestro programa nos


basaremos en el programa utilizado para arduino, utilizando uno de sus ejemplos
ya antes mostrado, en la pestaa 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 sern 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, segn 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 ningn 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, dndonos como resultado la siguiente imagen:

Practica 11
Objetivo
Con el mismo programa de corrimiento de leds o diodos emisores de luz realizar la
programacin 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 programacin de arduino, siguiendo el
siguiente programa:

// Encendido y apagado de 3 LEDs


int ledPin1 = 13; // Define las salidas de los LEDs
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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Llevaremos a cavo una modificacin 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 sern las encargadas de llevar a cavo nuestra
funcin, declararemos nuestras salidas 13,7,2 dichos pines sern 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, segn 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 ningn 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, dndonos como resultado la siguiente imagen:

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

// Encendido y apagado de 3 LEDs


int ledPin1 = 2; // Define las salidas de los LEDs
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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Llevaremos a cavo una modificacin 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 sern las encargadas de llevar a cavo nuestra
funcin, declararemos nuestras salidas 2,7,13 dichos pines sern 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, segn 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 ningn 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, dndonos como resultado la siguiente imagen:

Practica 13
Objetivo
Llevar a cavo la programacin 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 programacin de arduino,
siguiendo el siguiente programa:

// Encendido y apagado de 3 LEDs


int ledPin1 = 13; // Define las salidas de los LEDs

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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Llevaremos a cavo una modificacin en nuestro programa en base a la practica 9,


juntndola 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, dndonos como resultado la siguiente imagen:

Practica 14
Objetivo
Llevar a cavo la programacin 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 programacin de
arduino, siguiendo el siguiente programa:

// Encendido y apagado de 3 LEDs

int ledPin1 = 13; // Define las salidas de los LEDs


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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Llevaremos a cavo una modificacin en nuestro programa en base a la practica 9,


juntndola 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, adems
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, dndonos como resultado la siguiente imagen:

Practica 15
Objetivo
Utilizando Arduino y su debido lenguaje de programacin 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
funcin desde un principio utilizando una prctica 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 programacin y funcionamiento de esta prctica se utilizaran:
-

Arduino uno
Protoboard
Leds
Cables

Llevaremos a cavo una modificacin en nuestro programa en base a la practica


14, mediante la programacin de esta y aadiendo mas lneas 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 lnea. Para ello se llevara a cabo la modificacin 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, adems
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, dndonos como resultado la siguiente imagen:

Practica 16
Objetivo
Este ejercicio deber realizar un rayo de luz que valla de derecha a izquierda, o
ms poticamente, una estrella fugaz, movindose a travs de una lnea 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 slido cruzase la lnea de LED-s, esto
se realizara con el ya mencionado lenguaje de programacin de arduino,
siguiendo el siguiente programa:
// Variable declaracin
// Declaracin 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
// Nmero de LED-s que permanecen encendidos antes de empezar a apagarlos
para
//formar la cola
int tailLength = 4;
// Nmero de LED-s conectados (que es tambin el tamao del array)
int lineSize = 10;
void setup() // Configuracin 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<lineSize; i++)
{
digitalWrite(pinArray[i],HIGH); // Se encienden consecutivamente los LED
// Esta variable de tiempo controla la velocidad a la que se mueve la estrella

delay(waitNextLed);
if (tailCounter == 0)
{
// Se apagan los LED-s en funcin de la longitud de la cola.
digitalWrite(pinArray[i-tailLength],LOW);
}
else
if (tailCounter > 0)
tailCounter--;
}
for (i=(lineSize-tailLength); i<lineSize; i++)
{
digitalWrite(pinArray[i],LOW); // Se apagan los LED
// Esta variable de tiempo controla la velocidad a la que se mueve la estrella
delay(waitNextLed);
}
}

Desarrollo
Hay que conectar 11 LED-s a los pines digitales de la placa a travs de
resistencias de220 Ohmios tal y como se muestra en la imagen superior.
El programa comienza encendiendo LED-s hasta que llegue al nmero de LED-s
establecido para la cola. En ese momento seguir encendiendo LED-s hacia la
izquierda (si se monta tal y como se muestra en la fotografa inferior), para
mantener el movimiento de la estrella, al mismo tiempo que apaga LED-s por la
derecha, para
asegurarnos de que vemos la cola. De otra forma seguira encendiendo LED-s
hasta
encenderlos todos. Esto ocurre cuando el tamao de la cola es igual o mayor que
el nmero de LED-s.
El tamao de la cola debera ser relativamente pequeo en comparacin con el
nmero de LED-s de forma que podamos ver la estrella.

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, dndonos como resultado la siguiente imagen:

Practica 17
Objetivo
Este ejercicio deber realizar un rayo de luz que valla de izquierda a derecha, en
la misma estrella fugaz, movindose a travs de una lnea de LED-s. 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 slido cruzase la lnea de LED-s, esto se realizara
con el ya mencionado lenguaje de programacin de arduino, siguiendo el siguiente
programa:

// Variable declaracin
// Declaracin de los PIN-es mediante un array
int pinArray [] = { 11,10,9,8,7,6,5,4,3,2, };
int controlLed = 12; // LED de control
int waitNextLed = 100; // Tiempo antes de encender el siguiente LED
// Nmero de LED-s que permanecen encendidos antes de empezar a apagarlos
para
//formar la cola
int tailLength = 4;
// Nmero de LED-s conectados (que es tambin el tamao del array)
int lineSize = 10;
void setup() // Configuracin 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<lineSize; i++)

{
digitalWrite(pinArray[i],HIGH); // Se encienden consecutivamente los LED
// Esta variable de tiempo controla la velocidad a la que se mueve la estrella
delay(waitNextLed);
if (tailCounter == 0)
{
// Se apagan los LED-s en funcin de la longitud de la cola.
digitalWrite(pinArray[i-tailLength],LOW);
}
else
if (tailCounter > 0)
tailCounter--;
}
for (i=(lineSize-tailLength); i<lineSize; i++)
{
digitalWrite(pinArray[i],LOW); // Se apagan los LED
// Esta variable de tiempo controla la velocidad a la que se mueve la estrella
delay(waitNextLed);
}
}

Desarrollo
Hay que conectar 11 LED-s a los pines digitales de la placa a travs de
resistencias de220 Ohmios tal y como se muestra en la imagen superior.
El programa comienza encendiendo LED-s hasta que llegue al nmero de LED-s
establecido para la cola pero a la inversa de nuestra practica 16. En ese momento
seguir encendiendo LED-s hacia la izquierda (si se monta tal y como se muestra
en la fotografa inferior), para mantener el movimiento de la estrella, al mismo
tiempo que apaga LED-s por la derecha, para

asegurarnos de que vemos la cola. De otra forma seguira encendiendo LED-s


hasta
encenderlos todos. Esto ocurre cuando el tamao de la cola es igual o mayor que
el nmero de LED-s.
El tamao de la cola debera ser relativamente pequeo en comparacin con el
nmero de LED-s de forma que podamos ver la estrella.
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, dndonos como resultado la siguiente imagen:

Practica 18
Objetivo
Este ejercicio deber realizar en conjunto de esta practica estrella fugaz el
conjunto de la practica 13, que ha sido la unin de la practica 9, 10, 11 y 12, todas
estas en una sola, el corrimiento de leds de derecha a izquierda con los 5, luego
de izquierda a derecha, como posterior mente con solo 3 leds de derecha a
izquierda y viceversa para abrir paso a la estrella fugaz que se mover a travs

de una lnea de LED-s que parecer como si un rayo slido cruzase la lnea de
LED-s, esto se realizara con el ya mencionado lenguaje de programacin de
arduino, siguiendo el siguiente programa:
const int led1 = 2;
const int led2 = 3;
const int led3 = 4;
const int led4 = 5;
const int led5 = 6;

int pinArray [] = { 2,3,4,5,6,7,8,9,10,11,11,10,9,8,7,6,5,4,3,2 };


int controlLed = 12; // LED de control
int waitNextLed = 100; // Tiempo antes de encender el siguiente LED
// Nmero de LED-s que permanecen encendidos antes de empezar a apagarlos
para
//formar la cola
int tailLength = 4;
// Nmero de LED-s conectados (que es tambin el tamao del array)
int lineSize = 22;

void setup ()
{
pinMode (led1, OUTPUT); //Digital, como salida
pinMode (led2, OUTPUT); //Digital, como salida
pinMode (led3, OUTPUT); //Digital, como salida
pinMode (led4, OUTPUT); //Digital, como salida
pinMode (led5, OUTPUT); //Digital, como salida

{
int i;

pinMode (controlLed, OUTPUT);


for (i=0; i< lineSize; i++)
{
pinMode(pinArray[i], OUTPUT);
}
}

void loop ()
{
//pract 9
digitalWrite(led1, HIGH); // Apaga y enciende los leds cada 200 ms
delay(500);
digitalWrite(led1, LOW);
digitalWrite(led2, HIGH);
delay(500);
digitalWrite(led2, LOW);
digitalWrite(led3, HIGH);
delay(500);
digitalWrite(led3, LOW);
digitalWrite(led4, HIGH);
delay(500);
digitalWrite(led4, LOW);
digitalWrite(led5, HIGH);
delay(500);
digitalWrite(led5, LOW);

//Practica 10
digitalWrite(led5, HIGH); // Apaga y enciende los leds cada 200 ms
delay(500);
digitalWrite(led5, LOW);
digitalWrite(led4, HIGH);
delay(500);
digitalWrite(led4, LOW);
digitalWrite(led3, HIGH);
delay(500);
digitalWrite(led3, LOW);
digitalWrite(led2, HIGH);
delay(500);
digitalWrite(led2, LOW);
digitalWrite(led1, HIGH);
delay(500);
digitalWrite(led1, LOW);

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

//Practica 12
digitalWrite(led5, HIGH); // Apaga y enciende los leds cada 200 ms
delay(500);
digitalWrite(led5, LOW);
digitalWrite(led3, HIGH);
delay(500);
digitalWrite(led3, LOW);
digitalWrite(led1, HIGH);
delay(500);
digitalWrite(led1, LOW);

////////////////////////////////////////practica 18 ida y vuelta

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<lineSize; i++)
{
digitalWrite(pinArray[i],HIGH); // Se encienden consecutivamente los LED
// Esta variable de tiempo controla la velocidad a la que se mueve la estrella
delay(waitNextLed);
if (tailCounter == 0)
{

// Se apagan los LED-s en funcin de la longitud de la cola.


digitalWrite(pinArray[i-tailLength],LOW);
}
else
if (tailCounter > 0)
tailCounter--;
}
for (i=(lineSize-tailLength); i<lineSize; i++)
{
digitalWrite(pinArray[i],LOW); // Se apagan los LED
// Esta variable de tiempo controla la velocidad a la que se mueve la estrella
delay(waitNextLed);
}
}

Desarrollo
Se conectaran 10 leds, de los cuales primera mente se ejecutaran nuestras
primeras 4 practicas solo con la mitad de ellos por medio de los pines digitales de
la placa.
El programa comenzara con el encendido de 5 led de derecha a izquierda, para
continuar con el mismo proceso pero ahora de izquierda a derecha y luego lo har
con 3 leds, para posterior mente encender y abrirle paso al corrimiento de leds de
la estrella fugaz encendiendo LED-s hasta que llegue al nmero de LED-s

establecido para la cola. En ese momento seguir encendiendo LED-s hacia la


izquierda, para mantener el movimiento de la estrella, al mismo tiempo que apaga
LED-s por la derecha, para asegurarnos de que vemos la cola. De otra forma
seguira encendiendo LED-s hasta encenderlos todos. Esto ocurre cuando el
tamao de la cola es igual o mayor que el nmero de LED-s.
El tamao de la cola debera ser relativamente pequeo en comparacin con el
nmero de LED-s de forma que podamos ver la estrella.
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, dndonos como resultado la siguiente imagen:

You might also like