Pages: [1]   Go Down
Author Topic: 8x8 dual color matrix with 2 max7219's  (Read 793 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm currently working on a project that uses two 8x8 dual color matrixes as its display. Using a five button joystick, I'd like to move a cursor and select (turn on or off) leds in the matrix. I have two max7219's per matrix and can display test patterns in all three colors. I've also checked out the RowColumn Scanning example, but dont wish to use pots as my input.

Kinda stuck there... any help or guidance would be greatly appreciated!!!
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 506
Posts: 31345
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Kinda stuck there
Yes so am I. What is your question? What are you getting stuck on, so far you haven't described anything that doesn't work, or if you have you didn't say.
An answer's quality can only be as good as the question's quality.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

to be more specific, I would like to learn the best way to go about;

1. displaying and moving a single pixel cursor. probably blinking green, then turning on a single red pixel once selected.
2. adding a second matrix for a 8x16 display.

hopefully this is more clear. As im still new to the arduino language, I have been trying to start small and build up to the functionality I need. Unfortunately, i havent found too many examples that would help me for this project.

thanks
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 436
Posts: 23632
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

5-button joystick, as in it closes a switch when moved, left, right, forward, back, and 2 switches when pressed into a corner?
Or, it has two pots for left/right, forward/back, and 5 buttons on top of that?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 506
Posts: 31345
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Adding a second matrix, just repeat the hardware you have with exactly the same pins appart from its own chip select line. Use that to address the second display.
Addressing a single pixel - look at the code you already have and the data sheet for the 7219 that will tell you what you need to set a single pixel. Basically you will have an area of memory defining the pattern you are displaying, you have to change bits in that memory and then write it out to the chip.

There is no subistitute for knowing what you are doing, cut and paste coding will only take you as far as people have been before.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the joystick is from parallax and is four directional buttons and a center click.

as far as my approach, i couldnt agree more. even if i borrow someone elses code, i make sure to type every line myself. my problem seems to be combining elements from existing sketches- so many ways to acheive the same results. i would even appreciate suggested "baby step" projects to get my walk before my run.

so anyway... do i need to include color in my array? one color was just int pixels[8][8] but do i need to add a "layer" for two colors? like int pixels[2][8][8]?

Logged

Offline Offline
Edison Member
*
Karma: 26
Posts: 1339
You do some programming to solve a problem, and some to solve it in a particular language. (CC2)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As far as baby-step projects go, first of all I'd leave the joystick alone, and just try to turn on single led(s) in the matrix. This would be to understand the led addressing mechanics. I don't know your programming skills, but the code you'll have at this point could be turned into one or more functions that you can reuse later.

A second series of test sketches would deal with the joystick. Learn how to detect a state change, turn that into some sort of "direction" information, etc. Again, you should be able to turn this test code into a couple of function to detect joystick "movements".

From here one, combining the two things should be at least doable.

My 2 cents.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 506
Posts: 31345
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That sounds like a good plan.

Quote
do i need to include color in my array
It depends on what you want to do and how you have your two colour array wired up. Somewhere you will have the code that sends out your array to the chip, how do you feed that at the moment?

Quote
one color was just int pixels[8][8] but do i need to add a "layer" for two colors?
It depends on how you are going to use the array but one way is to use:-
char pixels[8][8]
 If the pixel is off store 0, if it is red store 1, if green store 2 and if yellow store 3
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ahh! many good.... i was not knowing about char pixels.

and thanks for your two cents... ill adjust for inflation smiley-eek
Logged

Pages: [1]   Go Up
Jump to: