Persistence Of Vision Display (POV Display)
1.1Introduction
What
is Persistence of Vision?
Persistence
of vision is a kind of optical illusion whereby multiple
discrete images blend into a single image in the human mind giving the
impression of an animation like any .GIF animated image you see we will
use this trick to make a DIY Arduino LED POVHow does it work?
we
will be drawing letters in two dimensions using 8 LED’s with the Y axis we have
the led row and the X axis is moving so by blinking the LED is a certain
pattern letters and words will show.
To draw the letter
B we will be flashing the LED’s in 5 simultaneous raws making a matrix of 8×5
like the image on the right and the code in the arduino will be
B [] = {1,1,1,1,1,1,1,1,
1,0,0,1,0,0,0,1,
1,0,0,1,0,0,0,1,
1,0,0,1,0,0,0,1,
0,1,1,0,1,1,1,0};
1.2 Making the DIY Arduino POV
A. Parts Needed:
- Strip board
- Arduino NANO
- LED’s
- 470Ω resistors
- Battery 9V and battery connector
- Some wires
- DC motor
- Adapter 12V
- Boost converter or Regulator(7805)
v
B. Tool Need:
1.3The Schematic:
1.4Arduino code to
upload:
int
NUMBER9[]={1,1,1,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1,
1,1,1,1,1,1,1,1};
int NUMBER8[]={0,1,1,0,1,1,1,0,
1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 0,1,1,0,1,1,1,0};
int NUMBER7[]={1,0,0,0,0,0,0,0,
1,0,0,0,1,0,0,0, 1,0,0,0,1,0,0,0, 1,0,0,1,1,1,1,1, 1,1,1,0,1,0,0,0};
int NUMBER6[]={1,1,1,1,1,1,1,1,
1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,1,1,1};
int NUMBER5[]={1,1,1,1,1,0,0,1,
1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,1,1,1};
int NUMBER2[]= {1,0,0,0,0,0,1,1,
1,0,0,0,0,1,0,1, 1,0,0,0,1,0,0,1, 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T[] = {1,0,0,0,0,0,0,0, 1,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1, 1,0,0,0,0,0,0,0, 1,0,0,0,0,0,0,0};
int U[] = {1,1,1,1,1,1,1,0, 0,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,1, 1,1,1,1,1,1,1,0};
int V[] = {1,1,1,1,1,1,0,0, 0,0,0,0,0,0,1,0,
0,0,0,0,0,0,0,1, 0,0,0,0,0,0,1,0, 1,1,1,1,1,1,0,0};
int W[] = {1,1,1,1,1,1,1,1, 0,0,0,0,0,0,1,0,
0,0,0,0,0,1,0,0, 0,0,0,0,0,0,1,0, 1,1,1,1,1,1,1,1};
int X[] = {1,1,0,0,0,0,1,1, 0,0,1,0,0,1,0,0,
0,0,0,1,1,0,0,0, 0,0,1,0,0,1,0,0, 1,1,0,0,0,0,1,1};
int Y[] = {1,1,0,0,0,0,0,0, 0,0,1,0,0,0,0,0,
0,0,0,1,1,1,1,1, 0,0,1,0,0,0,0,0, 1,1,0,0,0,0,0,0};
int Z[] = {1,0,0,0,0,1,1,1, 1,0,0,0,1,0,0,1,
1,0,0,1,0,0,0,1, 1,0,1,0,0,0,0,1, 1,1,0,0,0,0,0,1};
int* alpha[]=
{A,B,C,D,E,F,G,H,I,J,K,L,M,N};//,T,U,V,W,X,Y,Z};
int letterSpace;
int dotTime;
void setup()
{ Serial.begin(9600);
//
setting the ports of the leds to OUTPUT
for( int i = 2; i<10 ;i++ )
{ pinMode(i, OUTPUT);
}
//
defining the space between the letters (ms)
letterSpace = 2;
// defining the time dots appear (ms)
dotTime =1;
}
void printLetter(int letter[])
{
int y;
//
printing the first y row of the letter
for (y=0; y<8; y++)
{
digitalWrite(y+2, letter[y]);
}
delay(dotTime);
//
printing the second y row of the letter
for (y=0; y<8; y++)
{
digitalWrite(y+2, letter[y+8]);
}
delay(dotTime);
//
printing the third y row of the letter
for (y=0; y<8; y++)
{
digitalWrite(y+2, letter[y+16]);
}
delay(dotTime);
for(y = 0; y<8; y++) {
digitalWrite(y+2, letter[y+24]);
}
delay(dotTime);
for(y
= 0; y<8; y++) {
digitalWrite(y+2, letter[y+32]);
}
delay(dotTime);
// printing the sspace between the letters
for (y=0; y<8; y++)
{
digitalWrite(y+2, 0);
}
delay(letterSpace);
}
void loop()//write here =) enjoy subscribe to
my channel if you like the project
{
printLetter (C);
printLetter (A);
printLetter (M);
printLetter (B);
printLetter (O);
printLetter (D);
printLetter (I);
printLetter (A);
printLetter (_);
}
ឯកសារយោង
-DIY
Arduino POV Display Tutorial.htm
-
Youtube.com
-google.com
No comments: