 # need help understanding pin out in led matrix code

I don't understand how to connect my arduino to the LED matrix. The only line in the code that gives some instruction how is

pin[xx] on led matrix connected to nn on Arduino

you can find the rest of the code here

http://playground.arduino.cc/Main/DirectDriveLEDMatrix

thanks

// pin[xx] on led matrix connected to nn on Arduino (-1 is dummy to make array start at pos 1) int pins= {-1, 5, 4, 3, 2, 14, 15, 16, 17, 13, 12, 11, 10, 9, 8, 7, 6};

so as called out for the code below: pins = -1 pins = 5 pins = 4 etc pins = 8 pins = 7 pins  = 6

No doubt some adjusting will be needed if you don't have the very same matrix.

// col[xx] of leds = pin yy on led matrix int cols = {pins, pins, pins, pins, pins, pins, pins, pins};

// row[xx] of leds = pin yy on led matrix int rows = {pins, pins, pins, pins, pins, pins, pins, pins};

Thanks for replying

this adds some clarification, but I think that there is no pin -1 connected to anything. Also is this the correct pinout

arduino/matrix 1 /5 2 /4 3 /3 4 /2 5/14 6/15 7/16

etc

And after this all I have to do is change it based on the rows and columns of my display?

thanks for the help

There is no pin -1 because the pins is not called out: // col[xx] of leds = pin yy on led matrix int cols = {pins, pins, pins, pins, pins, pins, pins, pins};

// row[xx] of leds = pin yy on led matrix

int rows = {pins, pins, pins, pins, pins, pins, pins, pins};

YourArduino/Matrix mapping is correct.

after this all I have to do is change it based on the rows and columns of my display?

No doubt some adjusting will be needed if you don't have the very same matrix.