martes, 11 de mayo de 2010

POV standalone




Como Todo andaba bien con el POV para ser montado en la Arduinop me atreví a más y hice un circuito impreso exclusivo para un POV pero con la plataforma de un Stand Alone, con el Atmega, un cristal de 8Mhz porque el integrado es un 8pu y un par de condensadores.
con la intecion de colocarlos en los rayos de la bicicleta de mi hija, le deje a la placa un conector para un sensor para que sense los giro de la rueda y asi poder medir la velocidad de la bici y que esta se vea en la circunferencia de la rueda a traves de los Leds.


vista de frente

Aquí les dejo el codigo, aun no esta la funcion de velocimetro.



// defining the alphabet
int _[] = {0,0,0,0,0,0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,0};
int A[] = {0,1,1,1,1,1,1, 1,0,0,1,0,0,0, 1,0,0,1,0,0,0, 0,1,0,0,1,0,0, 0,1,1,1,1,1,1};
int B[] = {1,1,1,1,1,1,1, 1,0,0,1,0,0,1, 1,0,0,1,0,0,1, 1,0,0,1,0,0,1, 0,1,1,0,1,1,0};
int C[] = {0,1,1,1,1,1,0, 1,0,0,0,0,0,1, 1,0,0,0,0,0,1, 1,0,0,0,0,0,1, 0,1,0,0,0,1,0};
int D[] = {1,1,1,1,1,1,1, 1,0,0,0,0,0,1, 1,0,0,0,0,0,1, 0,1,0,0,0,1,0, 0,0,1,1,1,0,0};
int E[] = {1,1,1,1,1,1,1, 1,0,0,1,0,0,1, 1,0,0,1,0,0,1, 1,0,0,1,0,0,1, 1,0,0,0,0,0,1};
int F[] = {1,1,1,1,1,1,1, 1,0,0,1,0,0,0, 1,0,0,1,0,0,0, 1,0,0,1,0,0,0, 1,0,0,0,0,0,0};
int G[] = {0,1,1,1,1,1,0, 1,0,0,0,0,0,1, 1,0,0,0,0,0,1, 1,0,0,0,1,0,1, 0,1,0,0,1,1,0};
int H[] = {1,1,1,1,1,1,1, 0,0,0,1,0,0,0, 0,0,0,1,0,0,0, 0,0,0,1,0,0,0, 1,1,1,1,1,1,1};
int I[] = {1,0,0,0,0,0,1,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,1,1,0,0};
int V[] = {1,0,0,0,0,0,1, 0,1,0,0,0,1,0, 0,1,0,0,0,1,0, 0,0,1,0,1,0,0, 0,0,0,1,0,0,0};
int W[] = {1,0,0,0,0,0,1, 0,1,0,0,0,1,0, 0,1,0,1,0,1,0, 0,1,0,1,0,1,0, 0,0,1,0,1,0,0};
int X[] = {1,1,0,0,0,1,1, 0,0,1,0,1,0,0, 0,0,0,1,0,0,0, 0,0,1,0,1,0,0, 1,1,0,0,0,1,1};
int Y[] = {1,0,0,0,0,0,1, 0,1,0,0,0,1,0, 0,1,0,0,0,1,0, 0,0,1,0,1,0,0, 0,0,0,1,0,0,0};
int Z[] = {1,1,1,1,1,1,1, 0,0,0,0,1,0,0, 0,0,0,1,0,0,0, 0,0,1,0,0,0,0, 1,1,1,1,1,1,1};

int letterSpace;
int dotTime;

void setup()
{
// setting the ports of the leds to OUTPUT
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);

// defining the space between the letters (ms)
letterSpace = 6;
// defining the time dots appear (ms)
dotTime = 3;

}

void printLetter(int letter[])
{
int y;

// printing the first y row of the letter
for (y=0; y<7; y++)
{
digitalWrite(y+2, letter[y]);
}
delay(dotTime);

// printing the second y row of the letter
for (y=0; y<7; y++)
{
digitalWrite(y+2, letter[y+7]);
}
delay(dotTime);

// printing the third y row of the letter
for (y=0; y<7; y++)
{
digitalWrite(y+2, letter[y+14]);
}
delay(dotTime);

// printing the fourth y row of the letter
for (y=0; y<7; y++)
{
digitalWrite(y+2, letter[y+21]);
}
delay(dotTime);

// printing the fifth y row of the letter
for (y=0; y<7; y++)
{
digitalWrite(y+2, letter[y+28]);
}
delay(dotTime);

// printing the space between the letters
for (y=0; y<7; y++)
{
digitalWrite(y+2, 0);
}
delay(letterSpace);
}

void loop()
{
// printing some letters
printLetter(A);
printLetter(_);

}

1 comentario:

  1. Saludos desde Colombia, una pregunta ya terminaste el pov? lo instalaste en la bicicleta? por favor sube un video ya que este es un proyecto muy interesante, de antemano muchas gracias y felicitaciones.

    ResponderEliminar