HELP me with propeller clock (analog)

I am trying to make a propeller clock with arduino..
I have already written a code which displays the digital time on the LEDs connected to the PORTD of arduino..

Please help me coding the analog part.. How to do that..

The code for displaying the digital time is

#include <Time.h>

int n0[]={0x7C,0x82,0x82,0x82,0x7C};   // 0
int n1[]={0x80,0x84,0xFE,0x80,0x80};   // 1
int n2[]={0x84,0xC2,0xA2,0x92,0x8C};   // 2
int n3[]={0x44,0x82,0x92,0x92,0x6C};   // 3
int n4[]={0x10,0x18,0x14,0xFE,0x10};   // 4
int n5[]={0x4E,0x8A,0x8A,0x8A,0xD2};   // 5
int n6[]={0x7C,0x92,0x92,0x92,0x64};   // 6
int n7[]={0x02,0xF2,0x0A,0x06,0x02};   // 7
int n8[]={0x6C,0x92,0x92,0x92,0x6C};   // 8
int n9[]={0x4C,0x92,0x92,0x92,0x7C};   // 9
int ng[]={0x00,0x00};                  // SPACE
int nc[]={0x00,0x00,0xCC,0x00,0x00};   // :
int r;

void setup(){
  
   setTime(12,0,0,1,1,11); // set time to noon Jan 1 2011
   DDRD = B11111111;
}

void loop(){

 
  char ch2;
  int nn;
  char ch[2];
  int c;
  int h = hour();
  c=0;

while (h!=0)
{
  r = h%10;
  ch[c]= (char)r;
  c++;
  h=h/10;
  if (h==0)
  {
    ch[c+1] =(char) 0;
  }
    
}

for (int i = 1; i >=0 ; i--)
{
  ch2=ch[i];
  nn=(int)ch2;
  prnt(nn);
  
  
}

prntgp();
prntcol();



int m = minute();
c=0;

while (m!=0)
{
  r = m%10;
  ch[c]= (char)r;
  c++;
  m=m/10;
  if (m==0)
  {
    ch[c+1] =(char) 0;
  }
    
}

for (int i = 1; i >=0 ; i--)
{
  ch2=ch[i];
  nn=(int)ch2;
  prnt(nn);
  
  
}

prntgp();
prntcol();


int s = second();
c=0;

while (s!=0)
{
  r = s%10;
  ch[c]= (char)r;
  c++;
  s=s/10;
  if (s==0)
  {
    ch[c+1] =(char) 0;
  }
    
}

for (int i = 1; i >=0 ; i--)
{
  ch2=ch[i];
  nn=(int)ch2;
  prnt(nn);
  
  
}


prntgp();
prntgp();
prntgp();
prntgp();
prntgp();
}

/*******************************case loop***************************************/

void prnt(int n)
{
  switch(n)
  {
    
    case 0 :
    
     for(int i=0;i<5;i++)
  {
  PORTD= n0[i];
  delay(15);  
  }
  break;
    
    case 1 :
    
     for(int i=0;i<5;i++)
  {
  PORTD= n1[i];
  delay(15);  
  }
  break;
  
  
  
  case 2 :
    
     for(int i=0;i<5;i++)
  {
  PORTD= n2[i];
  delay(15);  
  }
  break;
  
  
  
  case 3 :
    
     for(int i=0;i<5;i++)
  {
  PORTD= n3[i];
  delay(15);  
  }
  break;
    
    
    case 4 :
    
     for(int i=0;i<5;i++)
  {
  PORTD= n4[i];
  delay(15);  
  }
  break;
  
  
  
  case 5 :
    
     for(int i=0;i<5;i++)
  {
  PORTD= n5[i];
  delay(15);  
  }
  break;
  
  
  
  case 6 :
    
     for(int i=0;i<5;i++)
  {
  PORTD= n6[i];
  delay(15);  
  }
  break;
  
  
  
  case 7 :
    
     for(int i=0;i<5;i++)
  {
  PORTD= n7[i];
  delay(15);  
  }
  break;
  
  
  case 8 :
    
     for(int i=0;i<5;i++)
  {
  PORTD= n8[i];
  delay(15);  
  }
  break;
  
  
  
  case 9 :
    
     for(int i=0;i<5;i++)
  {
  PORTD= n9[i];
  delay(15);  
  }
  break;
  
  }
}

 void prntgp()
 {
  for(int i=0;i<2;i++)
  {
  PORTD= ng[i];
  delay(15);  
  }
 }
 
 void prntcol()
 {
  for(int i=0;i<5;i++)
  {
  PORTD= nc[i];
  delay(15);  
  }
 }

I don't see anything to synchronize your display to the position of the propeller. To get an analog display to work you need a synchronizing signal, like a pulse per revolution. You could use an optical interrupter or hall-effect switch or something else but without and indicator of UP you can't tell where 12:00 should be displayed.

johnwasser:
I don't see anything to synchronize your display to the position of the propeller. To get an analog display to work you need a synchronizing signal, like a pulse per revolution. You could use an optical interrupter or hall-effect switch or something else but without and indicator of UP you can't tell where 12:00 should be displayed.

I have just written this code which keeps displaying the message.. It does not have a trigger for its starting position of the message..( just like mini pov )
I will add the trigger using a hall sensor..

For what I have thought about the propeller clock is that I will pick an interrupt on pin 3 of arduino at every revolution and calculate the the time take for the for the revolution and then I thought of dividing the time in 60 divisions ..

Need some help in it.. :frowning:

Joy:
For what I have thought about the propeller clock is that I will pick an interrupt on pin 3 of arduino at every revolution and calculate the the time take for the for the revolution and then I thought of dividing the time in 60 divisions ..

That's exactly how I would do it.