twisterss / ArduinoLEDMatrixPong

Arduino Sure Electronics 32x16 bi-color LED matrix library and pong example
5 stars 1 forks source link

Added a second screen... #1

Open Densys opened 11 years ago

Densys commented 11 years ago

Hey - thanks for the great code.

I added a second 16x32 screen, changed the defines to suit:

define WIDTH 64 // Width of the matrix (in LEDs)

define HEIGHT 16// Height of the matrix (in LEDs)

define CHIPS_X 4 // Number of chips horizontally

define CHIPS_Y 2 // Number of chips vertically

define CHIPS (CHIPS_X*CHIPS_Y) // Number of HT1632C Chips

define COLORS 2 // Number of colors supported

define LEDS_PER_CELL 4 // Number of LEDs adressed at the same time

define CELLS (WIDTH * HEIGHT * COLORS / (LEDS_PER_CELL * CHIPS)) // Number of adressable cells on one chip

define CELL_MASK ((1<<LEDS_PER_CELL) - 1) // Mask to get the LED data in one cell

define CELL_MODIFIED_MASK (1<<7) // Mask to get the modified bit in one cell

However, the order of the 8x8 blocks seem to be all over the place?

Would you let me know if you have time to help me with this? Very impressed with the speed of your system....

twisterss commented 11 years ago

Hi, each 8x8 block is controlled by a chip. The chip selection is done on line 110: int chip = x/(WIDTH/CHIPS_X) + CHIPS_X*(y/(HEIGHT/CHIPS_Y));

So if there is only a problem in chip selection, this is where it should be fixed. Sadly I haven't a second screen to test. Maybe I could help you with a picture of the result, and a description of the image you tried to display.

Densys commented 11 years ago

Thanks for the reply.

I will play with this line - will be a good exercise for me! I have only just got into arduino and electronics - since a kid I have been a programmer, most recently using PHP. C was mant moons ago for me, but it's all coming back slowly..... :)

Hopefully I won't get stuck - but if I do I may video my results. If I get it all working then I will also send you the code too.

Thanks again for your reply.

Chris Denman

On 14 January 2013 17:59, Twisterss notifications@github.com wrote:

Hi, each 8x8 block is controlled by a chip. The chip selection is done on line 110: int chip = x/(WIDTH/CHIPS_X) + CHIPS_X*(y/(HEIGHT/CHIPS_Y));

So if there is only a problem in chip selection, this is where it should be fixed. Sadly I haven't a second screen to test. Maybe I could help you with a picture of the result, and a description of the image you tried to display.

— Reply to this email directly or view it on GitHubhttps://github.com/twisterss/ArduinoLEDMatrixPong/issues/1#issuecomment-12230858.