In this instructable I will show you how to build a quite fancy 8 by 10 L.E.D matrix(with scrolling text and animations) using the Arduino and 4017 decade counter. This type of matrix is easy to make and program and it is a good way learn how to multiplex.

I have added another part to this instructable about using the 74HC595 shift register which will help to save some arduino pins for other thing you would like to do.

So now you have to ways to go from here. You can make this matrix without the shift register and that will save you some soldering work or use the shift register if you want to have more free pins to use.

Remove these adsRemove these ads by Signing Up

Step 1: Stuff you need

1. Soldering iron
2. Some solder
3. Small needle nose plier
4. A wire striper

For the matrix:
1. 80 L.E.D.s
2. 8 resistors( The value is determent by the type of L.E.D.s)
3. 4017 decade counter
4. 10 1KOhm resistors
5. 10 2N3904 transistors
6. Some single core wire
7. Perfboard
8. Arduino
optional -
9.  74HC595 shift register
10. some pin headers

1-40 of 207Next »
FedericoR9 days ago


I am working with both the 74HC595 and 4017 Decade Counter to acheive One-at-a-time lighting (without the letters going from one side to the other on the screen).

Is there any part of code that I can erase to just show the letters at once, rather than moving?

As you may imagine, I'm a newby here, so please share if possible. Thank you very much

FedericoR9 days ago


I am working with both the 74HC595 and 4017 Decade Counter to acheive One-at-a-time lighting (without the letters going from one side to the other on the screen).

Is there any part of code that I can erase to just show the letters at once, rather than moving?

As you may imagine, I'm a newby here, so please share if possible. Thank you very much

Hi, will it work with arduino substitute with same schema ??? thanks

tuberdj7 months ago

hey guys! I made a matrix (with shift register) with this nice instruction. I used exactly the code as posted above... But know after shifting a couple columns something strange happens... As a test I used a whole lighted matrix (or all B11111111), where after ALL LED's light up like they should. When this block has shifted four columns to the left in a normal way, a bug appears. In the next shifting step the whole next TWO columns aren't lighted and this remains two shifting time steps. After this the remaining two columns are shifted out like they should...
Does someone has a idea how to fix this problem? (A)

rca1238 months ago

HI... i want to make a 48x10 LED matrix for my arduino project. help me to modify the code of yours...

yusfsalim1 year ago
The Leonardo pin map
32U4PinMapping.pngpin map.png
Hi yusfsalim, it does work with Leonardo just fine, i just did it.
check the pins, it canbe very tricky. with a shift register it worked a lot better.
where can i buy the Arduino Duemilanove
yusfsalim1 year ago
Hey, I built the matrix but I used an arduino leonardo to code it.
I saw the ATmega 32U4-Arduino leonardo Pin Mapping diagram and Port manipulation is really different.
PORTD is used to control pins 0,1,2,3,4,6,12 and the tx LED. So the program that you have written is not applicable on the Leonardo. Could you help me change the code so that it is compatible with the Leonardo.
Thanks for the amazing instructable, any help would be great.
kirangowle1 year ago
I am doing the similar kind project with 8051 and 4094.
Can i use the same logic of yours.
This is what i have so far. it necessary to have a separate circuit to display the time and date....??
I added a RTC time chip with back-up battery, a TMP36 temperature sensor, a IR detector, and an arduino from scratch embedded on the broad. I tried to see how much stuff I could fit. :-) Let me know if you want the code, though it is not yet compatible with Arduino 1.0.
thanks mate....yea...if you can..send me the code and the schematics.. :)
ohh..what should i make it to be compatible with arduino 1.0?
sorry it took so long,
I don't have schematics but the pin locations can be found within the code.
could you please PM or email me the code and schematic so i could experiment with it.
sorry it took so long,
The code for this can be downloaded at
NOTE: This is not yet working with Arduino 1.0
If you convert this to 1.0 compatibility, please send it back to me at
I have one doubt.....When i use another shift register can extend the led matrix as a 16*10 by using same code... i mean i shows 2 letters scrolling....
jughead632 years ago
Great instuctable!! i am trying to make a 6x12 using this code without a shift regiser, I can get the 6x8 to work but not the last 4 colums. Can you help me with the code to use the 10-13 pins to controle the last 4 colums. Thanks
Any help would be greatly appreciated.
axeman9113 years ago
what is the purpose of a decade counter, adn how does it work? also what are its syntaxes in the arudino language? please help!!
Check the website he posted about the 4017 to start with it will give you the basics. There isn't any Arduino 'syntax' this is just a logic IC.
Blaneparker2 years ago
is it possible to use a attiny 45/85 or 44/84 to control the shift resistors?
KongDan2 years ago
First of all - great tutorial!
Might be a stupid question - how exactly do I connect the emitter pins of the transistors to the ground?
mzee2332 years ago
hi..thanks alooot sir...i made the matrix today and works great...!!
i jus wana know is it posible to scroll texts vertically..?? i'm totally noob to programming..!! can u help me..?? plz...!!
Blaneparker2 years ago
Can someone send me code for a 8 x 32 matrix. I just started with coding so I need a jump start. Email me at
fizzypop552 years ago
I am trying to build an LED deisplay that responds to a sound through a microphone, would this LED matrix work for something like that?
zolibert002 years ago
sir, what is the code to flash real time, could you post it in one of your attachments...thx
sciguy1022 years ago
hey my 10x8 led iz not workn well using arduino 1280 mega and the pin 0-7 are not workng..........18-21 are workn only and it can only power 4 colums ....plzzzzzzzzzzzz some1 help......................................tnxxxx
Can you tell me how to change the code for The Game of Life to start again after it dies out or gets stuck in a pattern. or after so many generations to start over. I am close to figuring it out but it eventually gets stuck and freezes on one generation. Any ideas?
Can your two sketches be joined? Like scroll some words, then play a round of Game of Life, back to scrolling words. Can that be done? (with the shift register) Thanks.
siddeshwar2 years ago
hey thats a nice one
bonhalt2 years ago
that work is wonderful! i dont know much about arduino.programming it en such.where can i get materials 4 such in details,am working on ma final year project 4 my degree so i need alot of stuff on micro controllers.y arduino?as in are there other micro controllers and which language do i need to learn to program most of the common ones in the market?help me out please.
Can someone tell me how to tweak the code to make it scroll from top to bottom so i can turn it on it's side and make it a 10x8 and not a 10x8? I want the words to go lengthwise. I figure that the letter code would have to be changed too. Thanks
asethi52 years ago
newbie here......what does a shift register do and is it necessary for scrolling text??Please help!!!!!!! ANYBODY!!!
EZELab asethi52 years ago

The Shift register is a way to increase the micro controller output pins, you can find more information here and here
EZELab2 years ago
Attaching my ONE ( :

Could you give us a Code to display only a one pattern ?

Nice Instructable ( :
Thank you
Syst3mX (author)  EZELab2 years ago
Congratz on the working matrix, looking great !

Yeah I will put a code till the end of the week.
are the transistors really neccesary?
1-40 of 207Next »