I am working on a rotating POV display (propeller display)..
The circuit is totally ready and is displaying the message that I have programmed..
The problem which I am facing is that I am unable to fix the starting position of the message with the interrupts from hall sensor..
Please guide me with that..
I have attached a picture of the whole PCB..
#define WIDTH 5 //Width of letters
char msg[]="RON";
const byte font [][WIDTH][8] =
{
{ {0,1,1,1,1,1,0,0},
{1,0,0,0,0,0,1,0},
{1,0,0,0,0,0,1,0},
{1,0,0,0,0,0,1,0},
{0,1,1,1,1,1,0,0}}, //0 // 48th position of ASCII code
{ {1,0,0,0,0,0,0,0},
{1,0,0,0,0,1,0,0},
{1,1,1,1,1,1,1,0},
{1,0,0,0,0,0,0,0},
{1,0,0,0,0,0,0,0}}, //1
{ {1,0,0,0,0,1,0,0}, {1,1,0,0,0,0,1,0}, {1,0,1,0,0,0,1,0}, {1,0,0,1,0,0,1,0}, {1,0,0,0,1,1,0,0}}, //2
{ {0,1,0,0,0,1,0,0}, {1,0,0,0,0,0,1,0}, {1,0,0,1,0,0,1,0}, {1,0,0,1,0,0,1,0}, {0,1,1,0,1,1,0,0}}, //3
{ {0,0,0,1,0,0,0,0}, {0,0,0,1,1,0,0,0}, {0,0,0,1,0,1,0,0}, {1,1,1,1,1,1,1,0}, {0,0,0,1,0,0,0,0}}, //4
{ {0,1,0,0,1,1,1,0}, {1,0,0,0,1,0,1,0}, {1,0,0,0,1,0,1,0}, {1,0,0,0,1,0,1,0}, {1,1,0,1,0,0,1,0}}, //5
{ {0,1,1,1,1,1,0,0}, {1,0,0,1,0,0,1,0}, {1,0,0,1,0,0,1,0}, {1,0,0,1,0,0,1,0}, {0,1,1,0,0,1,0,0}}, //6
{ {0,0,0,0,0,0,1,0}, {1,1,1,1,0,0,1,0}, {0,0,0,0,1,0,1,0}, {0,0,0,0,0,1,1,0}, {0,0,0,0,0,0,1,0}}, //7
{ {0,1,1,0,1,1,0,0}, {1,0,0,1,0,0,1,0}, {1,0,0,1,0,0,1,0}, {1,0,0,1,0,0,1,0}, {0,1,1,0,1,1,0,0}}, //8
{ {0,1,0,0,1,1,0,0}, {1,0,0,1,0,0,1,0}, {1,0,0,1,0,0,1,0}, {1,0,0,1,0,0,1,0}, {0,1,1,1,1,1,0,0}}, //9
{ {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, {1,1,0,0,1,1,0,0}, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}}, //:
{}, // as we do not need this ASCII codes, so false
{},
{},
{},
{},
{},
{{1,1,1,1,1,0,0,0}, {0,0,1,0,0,1,0,0} , {0,0,1,0,0,0,1,0} , {0,0,1,0,0,1,0,0} , {1,1,1,1,1,0,0,0}}, //A ASCII CODE 65
{{1,1,1,1,1,1,1,0}, {1,0,0,1,0,0,1,0}, {1,0,0,1,0,0,1,0}, {1,0,0,1,0,0,1,0}, {0,1,1,0,1,1,0,0}}, //B
{{0,1,1,1,1,1,0,0}, {1,0,0,0,0,0,1,0}, {1,0,0,0,0,0,1,0}, {1,0,0,0,0,0,1,0}, {0,1,0,0,0,1,0,0}}, //C
{{1,1,1,1,1,1,1,0}, {1,0,0,0,0,0,1,0}, {1,0,0,0,0,0,1,0}, {1,0,0,0,0,0,1,0}, {0,1,1,1,1,1,0,0}}, //D
{{1,1,1,1,1,1,1,0}, {1,0,0,1,0,0,1,0}, {1,0,0,1,0,0,1,0}, {1,0,0,1,0,0,1,0}, {1,0,0,0,0,0,1,0}}, //E
{{1,1,1,1,1,1,0,1}, {0,0,0,1,0,0,1,0}, {0,0,0,1,0,0,1,0}, {0,0,0,1,0,0,1,0}, {0,0,0,0,0,0,1,0}}, //F
{{0,1,1,1,1,1,0,0}, {1,0,0,0,0,0,1,0}, {1,0,1,0,0,0,1,0}, {1,0,1,0,0,0,1,0}, {0,1,1,0,0,1,0,0}}, //G
{{1,1,1,1,1,1,1,0}, {0,0,0,1,0,0,0,0}, {0,0,0,1,0,0,0,0}, {0,0,0,1,0,0,0,0}, {1,1,1,1,1,1,1,0}}, //H
{{1,0,0,0,0,0,1,0}, {1,0,0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,0,0,0,0,0,1,0}, {0,0,0,0,0,0,1,0}, {1,1,1,1,1,1,1,0}, {0,0,0,0,0,0,1,0}, {0,0,0,0,0,0,1,0}}, //T
{{0,1,1,1,1,1,1,0}, {1,0,0,0,0,0,0,0}, {1,0,0,0,0,0,0,0}, {1,0,0,0,0,0,0,0}, {0,1,1,1,1,1,1,0}}, //U
{{0,0,1,1,1,1,1,0}, {0,1,0,0,0,0,0,0}, {1,0,0,0,0,0,0,0}, {0,1,0,0,0,0,0,0}, {0,0,1,1,1,1,1,0}}, //V
{{1,1,1,1,1,1,1,0}, {0,1,0,0,0,0,0,0}, {0,0,0,1,0,0,0,0}, {0,1,0,0,0,0,0,0}, {1,1,1,1,1,1,1,0}}, //W
{{1,1,0,0,0,1,1,0}, {0,0,0,1,1,0,0,0}, {0,0,0,0,1,0,0,0}, {0,0,0,1,1,0,0,0}, {1,1,0,0,0,1,1,0}}, //X
{{0,0,0,0,0,1,1,0}, {0,0,0,0,1,0,0,0}, {1,1,1,1,0,0,0,0}, {0,0,0,0,1,0,0,0}, {0,0,0,0,0,1,1,0}}, //Y
{{1,1,0,0,0,0,1,0}, {1,0,1,0,0,0,1,0}, {1,0,0,1,0,0,1,0}, {1,0,0,0,1,1,0,0}, {1,0,0,0,0,1,1,0}}, //Z
};
int c;
void setup()
{
setTime(12,0,0,1,1,12); // set time to noon Jan 1 2012
for (int k=6;k<=12;k++)
pinMode(k,OUTPUT);
}
void display (char POVstring[])
{
for (int i=0; i<(strlen(POVstring)); i++)
{
for (int j=0; j<(WIDTH); j++)
{ c=0;
for(int k=12;k>=6;k--)
{
digitalWrite(k,font[(int)POVstring[i]-48][j][c]); //displaying port type
c++;}
delay(10);
for(int k=6;k<=12;k++)
{
digitalWrite(k,0); // displaying noting port type
}
delay(1);
} delay(10);
}
}
void loop()
{
message();
}
void message()
{
display(msg);
}