matrice leds 5X5

jojo5001

New Member
bonjour ,

Je viens chercher un peu d'aide auprès de personnes plus compétentes que moi je voudrais
commander une matrice de leds afin de générer des figures changeantes .
Pour cela j ai créé des symboles lignes et colonnes
l idée ensuite c est d attribuer une lettre par led correspondant a une ligne et une colonne .
Mon problème vient de la création du symbole de la led je ne peux pas lui attribuer deux symboles (une ligne et une colonne ).
Je prends surement mon projet a l envers mais je n ai pas trouvé de commande pour une matrice (rien pour mon faible niveau ).
Pour la partie électronique la ligne doit être niveau bas j inverserais ma sortie haute a l aide d'un buffer inverseur et pour la partie colonne
d'un buffer pour un peu plus de puissance.
je joins un bout de code surement désespérant pour les spécialistes .
tout aide sera la bienvenue merci d'avance .
Georges

[;picaxe 20M2


symbol row1 = B.1 ;ligne 1
symbol row2 = B.2 ;ligne 2
symbol row3 = B.3 ;ligne 3
symbol row4 = B.4 ;ligne 4
symbol row5 = B.5 ;ligne 5

symbol col1 = C.1 ;colonne 1
symbol col2 = C.2 ;colonne 2
symbol col3 = C.3 ;colonne 3
symbol col4 = C.4 ;colonne 4
symbol col5 = C.5 ;colonne 5

symbol aa = row1 and col1 ;led a
symbol bb = row2 and col2 ;led c
symbol cc = row3 and col3 ;led d

symbol te = 2000 ;temporisation

high aa,bb,cc ;leds a b c on
pause te ;temporisation
low aa,bb,cc ;leds a b c off


high cc,bb ;leds c b on
pause te ;temporisation
low cc,bb ;leds c b off ]
 

Buzby

Senior Member
Hi Jojo,

I don't speak French, but Google gave me a clue as to what you are trying to do.

Your code is OK upto 'symbol col5 = C.5 ;colonne 5'.

By now you have defined 10 outputs, 5 for rows and 5 for columns.

But after that you are just 'anding' two numbers, each 1 to 5, which does not make any sense at all.


What you need is ( assuming your LEDs are wired in a 'normal' 5x5 matrix ) is to activate the rows one by one, then activate the required columns for the current row. Repeat this for a steady display.

Code:
do
 for row = 1 to 5
   activate row
   active columns
 next row
loop
I'm sure a search of the forum would turn up some example code.

Cheers,

Buzby
 

jojo5001

New Member
Hello Buzby
Thank you for your answer I will
looked more ready your explanation
the idea to name leds (25 leds) will allow me more ease
to change their state for example high AA, BB, II, LL etc etc .....
I'm sorry if I'm confused but I do not know the matrix commands well, thank you for your help
have a good day
Georges
 

jojo5001

New Member
Hello

I'm sorry I posted on the
bad forum :(
I pass on the forum Francophonne
all of my apologies
if an administrator can close the subject I would be
very grateful
thank you Georges
 
Top