t = Integer.parseInt (w.readLine
());
if (t == 1)
{
cpt = 22 – cp;
for (int i = 0 ; i <= cpt ;
i++)
{
for (int j = 0 ; j <= 3 ;
j++)
{
d = (int) Math.pow (2, j);
lpt1.write (d);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
for (int i = 0 ; i <= 22 ;
i++)
{
for (int j = 3 ; j >= 0 ;
j–)
{
g = (int) Math.pow (2, j);
lpt1.write (g);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
}
if (t == 2)
{
for (int i = 0 ; i <= cp ;
i++)
{
for (int j = 3 ; j >= 0 ;
j–)
{
f = (int) Math.pow (2, j);
lpt1.write (f);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
}
}
if (hora == 15)
{
cp = 8 * 2;
for (int i = 0 ; i <= cp ;
i++)
{
for (int j = 0 ; j <= 3 ;
j++)
{
m = (int) Math.pow (2, j);
lpt1.write (m);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
System.out.println ("Terminar el giro y
volver al punto de partida, introducir numero 1");
System.out.println ("Volver al punto de
partida,introducir el numero 2");
t = Integer.parseInt (w.readLine
());
if (t == 1)
{
cpt = 22 – cp;
for (int i = 0 ; i <= cpt ;
i++)
{
for (int j = 0 ; j <= 3 ;
j++)
{
d = (int) Math.pow (2, j);
lpt1.write (d);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
for (int i = 0 ; i <= 22 ;
i++)
{
for (int j = 3 ; j >= 0 ;
j–)
{
g = (int) Math.pow (2, j);
lpt1.write (g);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
}
if (t == 2)
{
for (int i = 0 ; i <= cp ;
i++)
{
for (int j = 3 ; j >= 0 ;
j–)
{
f = (int) Math.pow (2, j);
lpt1.write (f);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
}
}
if (hora == 16)
{
cp = 9 * 2;
for (int i = 0 ; i <= cp ;
i++)
{
for (int j = 0 ; j <= 3 ;
j++)
{
m = (int) Math.pow (2, j);
lpt1.write (m);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
System.out.println ("Terminar el giro y
volver al punto de partida, introducir numero 1");
System.out.println ("Volver al punto de
partida,introducir el numero 2");
t = Integer.parseInt (w.readLine
());
if (t == 1)
{
cpt = 22 – cp;
for (int i = 0 ; i <= cpt ;
i++)
{
for (int j = 0 ; j <= 3 ;
j++)
{
d = (int) Math.pow (2, j);
lpt1.write (d);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
for (int i = 0 ; i <= 22 ;
i++)
{
for (int j = 3 ; j >= 0 ;
j–)
{
g = (int) Math.pow (2, j);
lpt1.write (g);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
}
if (t == 2)
{
for (int i = 0 ; i <= cp ;
i++)
{
for (int j = 3 ; j >= 0 ;
j–)
{
f = (int) Math.pow (2, j);
lpt1.write (f);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
}
}
if (hora == 17)
{
cp = 10 * 2;
for (int i = 0 ; i <= cp ;
i++)
{
for (int j = 0 ; j <= 3 ;
j++)
{
m = (int) Math.pow (2, j);
lpt1.write (m);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
System.out.println ("Terminar el giro y
volver al punto de partida, introducir numero 1");
System.out.println ("Volver al punto de
partida,introducir el numero 2");
t = Integer.parseInt (w.readLine
());
if (t == 1)
{
cpt = 22 – cp;
for (int i = 0 ; i <= cpt ;
i++)
{
for (int j = 0 ; j <= 3 ;
j++)
{
d = (int) Math.pow (2, j);
lpt1.write (d);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
for (int i = 0 ; i <= 22 ;
i++)
{
for (int j = 3 ; j >= 0 ;
j–)
{
g = (int) Math.pow (2, j);
lpt1.write (g);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
}
if (t == 2)
{
for (int i = 0 ; i <= cp ;
i++)
{
for (int j = 3 ; j >= 0 ;
j–)
{
f = (int) Math.pow (2, j);
lpt1.write (f);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
}
}
if (hora == 18)
{
cp = 11 * 2;
for (int i = 0 ; i <= cp ;
i++)
{
for (int j = 0 ; j <= 3 ;
j++)
{
m = (int) Math.pow (2, j);
lpt1.write (m);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
System.out.println ("Terminar el giro y
volver al punto de partida, introducir numero 1");
System.out.println ("Volver al punto de
partida,introducir el numero 2");
t = Integer.parseInt (w.readLine
());
if (t == 1)
{
cpt = 22 – cp;
for (int i = 0 ; i <= cpt ;
i++)
{
for (int j = 0 ; j <= 3 ;
j++)
{
d = (int) Math.pow (2, j);
lpt1.write (d);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
for (int i = 0 ; i <= 22 ;
i++)
{
for (int j = 3 ; j >= 0 ;
j–)
{
g = (int) Math.pow (2, j);
lpt1.write (g);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
}
if (t == 2)
{
for (int i = 0 ; i <= cp ;
i++)
{
for (int j = 3 ; j >= 0 ;
j–)
{
f = (int) Math.pow (2, j);
lpt1.write (f);
try
{
Thread.sleep (100);
}
catch (InterruptedException ie)
{
ie.printStackTrace ();
}
}
}
}
}
break;
}
}
while (opcion != 3);
lpt1.write (0);
}
}
//———————————-
public static void main (String[] args)
throws IOException
{
new Aplicacion ();
}
}
8. MATERIALES
Pro tobar
Tester
Resistenisias
Motor pasó a paso
Pulsadores
Leeds
Pic16xxx
Puerto paralelo
Fuente
Panel solar
Computadora
Conclusiones
Como verán en las fotografías
y el video logramos hacer que funcione estupendamente bien el
programa para controlar el motor paso a paso, el armado del
circuito, la aplicación que se puede dar con un buen panel
solar y el buen funcionamiento del giro que se puede dar el con
un motor paso a paso conjuntamente acopado a un panel solar.
habiendo también algunas fallas en el motor el cual se
debe revizar su funcionamineto antes del armado del circuito y
después del armado y tomando en cuenta el peso del panel y
del brazo para lograr hacer girar el motor.
Autor:
Mamani Platero Alex
Michael
Chacon Hinojosa Alejandro
Nicolas Agudo Alvaro
Ramos Huancani Daniel
Mendoza Loza Diego
Tito Orellana Rodrigo
Enviado por:
DanRamos
Página anterior | Volver al principio del trabajo | Página siguiente |