Arduino‎ > ‎Brewing Arduino‎ > ‎

Basic Tutorial by Beginner - Matrix LED Part 1

posted Oct 6, 2010, 8:12 PM by Haris Hashim   [ updated Oct 16, 2010, 9:37 PM ]
Sometime last week, while cruising through Jalan Pasar Pudu. I found this 5x7 (or is it 7x5) Matrix LED selling for about RM10. There is only 2 and I bought 1. So maybe there is 1 more left there!

Being an absolute kludge I also bought 1 protoboard, only to discover later that it takes two protoboard side by side to properly mount the LED. 

Without the second protoboard, only the bottom pins are accessible. Workable I guess, since with that still able to address rows 4,5,6,7 and columns  2,3,5. 

But, as you can see in the picture to the right I improvise it to add row 3 and columns 4. The "restraining" green and yellow wire is not pretty. But it works and basically not even soldered! Now that is 3,4,5,6,7 and columns  2,3,4,5 with 20 LEDs. That should be enough for our fun.

Just keep in mind that we are going to start with 4 LEDs first (rows 4,5 and columns 4,5).



Finding the spec sheet and wading through all those information is not easy. So there up above. That is the crux of it and the only usefull stuff need to be known from spec sheet. Should be enough knowledge to physically wire the matrix LED. Don't forget current limiting resistor for each anode. Anyway, here is some picture that might help.



With that done. Finally we can move on to more interesting stuff. Which is the subject of this part 1 tutorial. How to program Arduino. 

And that, my friend is the purpose of bellow picture tutorial. Enjoy!




Continue to part 2


The source code

int Row4 = 4;
int Row5 = 5;
int Col4 = 10;
int Col5 = 11;

int milis = 10;

void setup() {   
  pinMode(Row4, OUTPUT);    
  pinMode(Row5, OUTPUT); 
  pinMode(Col4, OUTPUT); 
  pinMode(Col5, OUTPUT); 
  
  digitalWrite(Row4, HIGH);
  digitalWrite(Row5, HIGH);
  digitalWrite(Col4, LOW);
  digitalWrite(Col5, LOW);
}

void loop() {  
  digitalWrite(Row4, HIGH);
  digitalWrite(Row5, LOW);
  
  digitalWrite(Col4, LOW);
  digitalWrite(Col5, HIGH);
  
  delay(milis);
  
  digitalWrite(Row4, LOW);
  digitalWrite(Row5, HIGH);
    
  digitalWrite(Col4, HIGH);
  digitalWrite(Col5, LOW);
    
  delay(milis);
}



Conversation Element


ą
Haris Hashim,
Oct 6, 2010, 9:03 PM
Comments