Professional Documents
Culture Documents
su posicin relativa.
I.
INTRODUCCION
II. OBJETIVOS
Objetivo General.
Mostrar las iniciales de los nombres en tres display de 7
segmentos usando arreglos.
Objetivos especficos.
Entender las ventajas de usar arreglos para programar.
Identificar los distintos usos de los arreglos en la
programacin.
SINTAXIS
Declaracin:
IV. PROCEDIMIENTO
Codigo:
Cdigo de letras:
int boton1 = 21;
int boton2 = 20;
int pulsador =13;
int segundos = 0;
int minutos = 0;
2
int n;
byte Digit[4][8] =
{ { 1,1,1,1,1,1,0,0 }, // 0
{ 1,1,1,0,1,1,1,0 }, // A
{ 1,0,1,1,0,1,1,0 }, // S
{ 1,0,0,0,1,1,1,0 }, // F
};
void setup()
{ for (int i= 2; i<13; i++)
pinMode(i, OUTPUT);
pinMode(21,INPUT);
attachInterrupt( 2, ServicioBoton,LOW);
}
void loop()
{
for(int j=1;j<4;j++){
Display(3 , j);
Display(2 , j);
Display(1 , j);
Display(0 , j);
delay(1000);
}
}
void ServicioBoton()
{
Display(3 ,0);
Display(2 ,0);
Display(1 ,0);
Display(0 ,0);
}
void Display(int pos, int N)
{
3
V. CONCLUSIONES
VI. REFERENCIAS
[1]https://www.arduino.cc/en/Reference/AttachInterrupt
[2] https://www.arduino.cc/en/Reference/Array
[3]http://fuenteabierta.teubi.co/2012/12/manejo-deinterrupciones-con-arduino.html
[4]https://floreziitha13.wordpress.com/2014/04/30/practi
ca-no-3-letreros-en-4-displays/
[5] http://www.prometec.net/display-4digitos/
[6] http://fuenteabierta.teubi.co/2012/12/manejo-deinterrupciones-con-arduino.html
[7] http://panamahitek.com/tipos-de-datos-arrays-enarduino/