[OT] simple matrix in arduino

Sep 8, 2009 at 6:48am

[OT] simple matrix in arduino

hi,

i know its a arduino question but i know here are many arduino users as well and mybe someone can help me here (i am new to arduino)

i need to programm a simple LED matrix:

9 led’s (3×3 matrix)

7 4 1
8 5 2
9 6 3

i like to have 3 rows (7 4 1, 8 5 2, 9 6 3)
and 3 columns ( 1 2 3, 4 5 6, 7 8 9) which are randomly turn on and off.

i guess i have to store the row and column numbers somewhere (in max i would use the coll objects) and randomly read those as outputs high / Low.

1 = (1 2 3)
2 = (4 5 6)
3 = (7 8 9)
4 = (7 4 1)
5 = (8 5 2)
6 = (9 6 3)

anybody can point me somewhere ?

many many thanks !!

pe

#45382
Sep 8, 2009 at 2:24pm

what exactly are you asking for help with?

all you really need to do on the max side is send the numbers 1-6 (and you also might want to add a number that turns all the LEDs off, e.g. 0). On the arduino side your sketch needs to listen for these numbers and when received turn on the appropriate LED (via WRITE, btw, not READ) by taking the corresponding output on the arduino HIGH. The ’0′ I was proposing above would take all your outputs LOW. Send a message “0,5″ message from max to turn off any LEDs that are currently on, and turn on 8,5,2, for example.

But again…not really sure what you are asking for help with.

David

#163577

You must be logged in to reply to this topic.