Persistence Of Vision (POV) software


this looks interesting.  can work?  it doesn't seem work me.  there no activity on pins 2.3.4.5.6 when checked oscilloscope.  how 1 troubleshoot code?  i new @ coding , learning. particularly don't understand line:  void printletter(int letter[])

does have other arduino pov projects?

/*
[ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533]
persistence of vision typography arduino
michael zoellner - march 2006
http://i.document.m05.de

connect anodes (+) of 5 leds digital ports of arduino board
and put 20-50 ohm resistors cathode (-) ground.

the letters lookup tables consisting arrays width dot status in y rows.
[ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533][ch65533]
*/


// defining alphabet
int _[] = {0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0};
int a[] = {0,1,1,1,1, 1,0,1,0,0, 0,1,1,1,1};
int b[] = {1,1,1,1,1, 1,0,1,0,1, 0,1,0,1,0};
int c[] = {0,1,1,1,0, 1,0,0,0,1, 1,0,0,0,1};
int d[] = {1,1,1,1,1, 1,0,0,0,1, 0,1,1,1,0};
int e[] = {1,1,1,1,1, 1,0,1,0,1, 1,0,1,0,1};
int f[] = {1,1,1,1,1, 1,0,1,0,0, 1,0,1,0,0};
int g[] = {0,1,1,1,0, 1,0,1,0,1, 0,0,1,1,0};
int h[] = {1,1,1,1,1, 0,0,1,0,0, 1,1,1,1,1};
int i[] = {0,0,0,0,1, 1,0,1,1,1, 0,0,0,0,1};
int j[] = {1,0,0,0,0, 1,0,0,0,1, 1,1,1,1,1};
int k[] = {1,1,1,1,1, 0,0,1,0,0, 0,1,0,1,1};
int l[] = {1,1,1,1,1, 0,0,0,0,1, 0,0,0,0,1};
int m[] = {1,1,1,1,1, 0,1,1,0,0, 0,1,1,1,1};
int n[] = {1,1,1,1,1, 1,0,0,0,0, 0,1,1,1,1};
int o[] = {0,1,1,1,0, 1,0,0,0,1, 0,1,1,1,0};
int p[] = {1,1,1,1,1, 1,0,1,0,0, 0,1,0,0,0};
int q[] = {0,1,1,1,1, 1,0,0,1,1, 0,1,1,1,1};
int r[] = {1,1,1,1,1, 1,0,1,0,0, 0,1,0,1,1};
int s[] = {0,1,0,0,1, 1,0,1,0,1, 1,0,0,1,0};
int t[] = {1,0,0,0,0, 1,1,1,1,1, 1,0,0,0,0};
int u[] = {1,1,1,1,1, 0,0,0,0,1, 1,1,1,1,1};
int v[] = {1,1,1,1,0, 0,0,0,0,1, 1,1,1,1,0};
int w[] = {1,1,1,1,0, 0,0,1,1,0, 1,1,1,1,0};
int x[] = {1,1,0,1,1, 0,0,1,0,0, 1,1,0,1,1};
int y[] = {1,1,0,0,0, 0,0,1,0,0, 1,1,1,1,1};
int z[] = {1,0,0,1,1, 1,0,1,0,1, 1,1,0,0,1};

int letterspace;
int dottime;

void setup()
{
 // setting ports of leds output
 pinmode(2, output);
 pinmode(3, output);
 pinmode(4, output);
 pinmode(5, output);
 pinmode(6, output);
 
 // defining space between letters (ms)
 letterspace = 6;
 // defining time dots appear (ms)
 dottime = 3;
 
}

void printletter(int letter[])
{
 int y;
 
 // printing first y row of letter
 for (y=0; y<5; y++)
 {
   digitalwrite(y+2, letter[y]);
 }
 delay(dottime);
 
 // printing second y row of letter
 for (y=0; y<5; y++)
 {
   digitalwrite(y+2, letter[y+5]);
 }
 delay(dottime);
 
 // printing third y row of letter
 for (y=0; y<5; y++)
 {
   digitalwrite(y+2, letter[y+10]);
 }
 delay(dottime);
 
 // printing sspace between letters
 for (y=0; y<5; y++)
 {
   digitalwrite(y+2, 0);
 }
 delay(letterspace);
}

void loop()
{
 // printing letters
 printletter(n);
 printletter(e);
 printletter(r);
 printletter(d);
 printletter(s);
 printletter(_);
}

it works me. used 220 ohm resistor on -each- led. i can't can see word it's supposed display yet, there's in there...i think needs have timing values adjusted.

scratch that-- can see word pretty now. have wave in front of face raving lunatic, , you'll see it. make tutorial prototyping classes...

ps:
void printletter() user function spits out proper led values,  
and
int letter[] array variable.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Persistence Of Vision  (POV) software


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums