POV code not working

this is my first post here and first real arduino project

ok i wrote this code to make a pov
i borrowed the letter index from another user
DopeyAlan
which i appreciate very much
it saved me a lot of time

currently the arduino lights up the first code for the letter 'H'
which would be 01110111
but it just stops there i would appreciate any help you could offer

const int ledCount = 8; // the number of LEDs in the POV

boolean col[8]={
0,0,0,0,0,0,0,0};//binary from hex to binary conversion
int letters[][5] = { //begin letter hex index
{
0x7e, 0x09, 0x09, 0x09, 0x7e }
, //A
{
0x7f, 0x49, 0x49, 0x49, 0x36 }
, //B
{
0x3e, 0x41, 0x41, 0x41, 0x22 }
, //C
{
0x7f, 0x41, 0x41, 0x22, 0x1c }
, //D
{
0x7f, 0x49, 0x49, 0x49, 0x49 }
, //E
{
0x7f, 0x09, 0x09, 0x09, 0x09 }
, //F
{
0x7e, 0x41, 0x49, 0x49, 0x38 }
, //G
{
0x7f, 0x08, 0x08, 0x08, 0x7f }
, //H
{
0x00, 0x41, 0x7f, 0x41, 0x00 }
, //I
{
0x30, 0x40, 0x41, 0x7f, 0x01 }
, //J
{
0x7f, 0x08, 0x14, 0x22, 0x41 }
, //K
{
0x7f, 0x40, 0x40, 0x40, 0x40 }
, //L
{
0x7f, 0x02, 0x04, 0x02, 0x7f }
, //M
{
0x7f, 0x02, 0x0c, 0x10, 0x7f }
, //N
{
0x3e, 0x41, 0x41, 0x41, 0x3e }
, //O
{
0x1e, 0x21, 0x21, 0x21, 0x5e }
, //Q
{
0x7f, 0x09, 0x19, 0x29, 0x46 }
, //R
{
0x26, 0x49, 0x49, 0x49, 0x32 }
, //S
{
0x01, 0x01, 0x7f, 0x01, 0x01 }
, //T
{
0x3f, 0x40, 0x40, 0x40, 0x3f }
, //U
{
0x07, 0x38, 0x40, 0x38, 0x07 }
, //V
{
0x3f, 0x40, 0x3f, 0x40, 0x3f }
, //W
{
0x63, 0x14, 0x08, 0x14, 0x63 }
, //X
{
0x07, 0x08, 0x70, 0x08, 0x07 }
, //Y
{
0x61, 0x51, 0x49, 0x45, 0x43 } //Z

};//end letter hex index/
int ledPins[] = {
2, 3, 4, 5, 6, 7,8 ,9}; //pin numbers for leds

void bincon(int num){ //binary conversion
int count=0; //counter so that 1 or 0 gets put in the correct place in col array
for(int i=128; i >=1; i/= 2){ //for loop to get binary from a integer by subtracting 128,64,32,16,8,4,2,or 1 from the number and seeing if it is above 0

num -= i;
if (num >=0){

col[count]= 1;// puts 1 in col

}
else{
num += i;
col[count]= 0;//puts 0 in col

}

count++;

}
}

void printletter(char letter){ //takes char and prints it on the leds
int letnum = int(letter); //converts char type to integer
for(int j=0;j<5;j++){ //for loop to get each hex and change it to binary then print it

bincon(letters[letnum-65][j]); // changes hex calue from index to binary and puts it in to col string/array

for (int i=0;i<8;i++){ //loop to print the col string/array to leds

if (col*==1){*
_ digitalWrite(ledPins*,HIGH);_
_
}_
_
else{_
_ digitalWrite(ledPins,LOW);
}
}
}
delayMicroseconds(750);
}
void setup() {
for (int thisLed = 0; thisLed < ledCount; thisLed++) { // set pins to output*
* pinMode(ledPins[thisLed], OUTPUT);
}
}
void loop() {
printletter('H');
printletter('I');
}
[/quote]*_

The first code of 'H' appears to be 0x7f, 01111111 according to the letters array.
I don't see anything obviously wrong with the code (other than that it is slow). Try putting a Serial.print of num at the start of bincon so you can verify that all the intended values are fetched.

i finally got it working the issue with theletter H was because one of the leds wasnt hooked up =\ and my delay was in the wrong spot it was delaying after every letter instead of every column.

what do you mean by its slow?
do you mean that the delay is too long or that the code is ineffiecient
i haven't been programming long alittle bit of flash and c++ and i just got my arduino in a few days ago.

thanks for the help. :slight_smile:

if (col[i]==1){
       digitalWrite(ledPins[i],HIGH);
     }
     else{
       digitalWrite(ledPins[i],LOW);
     }
}

since LOW==0 and HIGH==1 you could replace that with

digitalWrite(ledPins[i], col[i]);

digitalWrite itself is also slow. Not only does the call take time but you need to call it 8 times to set all the LEDs.
With port manipulation (search for it on the forum) you can copy the value from letters[] straight to all 8 LEDs in one operation without needing bincon().