Introduction: Arduino (SPI) 7 Bi-color LED Matrix Scrolling Text Display

Picture of Arduino (SPI) 7 Bi-color LED Matrix Scrolling Text Display

Some time back, we came up with an instructable to build a 7 Bi-color 8x8 LED Matrix Scrolling Text Display. You may visit for more detail.

In that instructable, we used the excellent LedControl library that has been specifically written for the MAX7219 which greatly simplifies the program coding for the project’s Arduino sketch. However, as this library uses normal digital output pins to control the display, fast and smooth scrolling text effect is not able to be achieved using normal Arduino boards if many LED matrices are cascaded together to make a long display. That is why we suggest to use the chipKit UNO32 micro-controller board which is based on the popular Arduino Open Source hardware platform to drive the display as it is much more capable of producing faster and better scrolling text effect than Arduino boards though it is a bit more expensive.

Arduino is currently one of the most popular open-source micro-controller hardware used by electronics hobbyists and it is a pity if the Arduino boards they already owned cannot be used for the project to produce fast and smooth scrolling text effect for long displays.

In this instructable, we will build another 7 Bi-color 8x8 LED Matrix Scrolling Text Display controlled by an Arduino Nano board in which messages and commands can be sent to it via Bluetooth using an Android Smart Phone. However, we will not be using the LedControl library for this project and instead will be using the SPI library to directly transfer instructions and data to the display. It may not look like a huge change to the project but using SPI for the interface offers impressive increase in data transfer speed which translates into fast and smooth scrolling text effect for the project and also reduces some complexity to the wirings as only 3 SPI lines are needed to drive the display instead of 6 previously.

To build this project, basic electronics component soldering skill and some knowledge on using the Arduino is required.

The reason for building a 7 LED matrices long display is that it is quite adequate for ease of reading scrolling text. The LED matrix we are using is around 60mm x 60mm in size for each matrix. Here, we have built a new enclosure for our display using clear acrylic tube with internal diameter of 64mm.

In this instructable, we will be repeating some of the sections from our previous instructable as we hope this instructable is as complete as possible by itself.

You may view the following YouTube video to see what we are building.

Step 1: LED Matrix Driver Module Assembly

Picture of LED Matrix Driver Module Assembly

The display is built using seven of the Bi-color (Red and Green) LED Matrix Driver Module kits from jolliFactory. Each of these modules uses two MAX7219 Display Driver ICs to drive a Bi-color LED Matrix. These ICs are excellent because they take a lot of work off the micro-controller and simplify the wiring and logic design. You can daisy-chain up these Bi-color LED Matrices to form a long display driven using only three SPI line pins on the micro-controller for the interface.

You can find this Bi-color LED Matrix Driver Module kit from here with information on the assembly of the kit. You may order this kit from Tindie.

This kit comes with all through-hole components and someone with basic soldering skills should be able to assemble it without much difficulty.

You may view the following YouTube video on the assembly of the Bi-color LED Matrix Driver Module kit.

Step 2: Wiring

Picture of Wiring

After all the kits are completed, they are connected together to the Arduino board as shown (LED matrices not installed for better view).

Serial Peripheral Interface (SPI) is a synchronous serial data protocol used by microcontrollers for communicating with one or more peripheral devices quickly over short distances.

With an SPI connection there is always one master device (usually a microcontroller) which controls the peripheral devices. Typically there are three lines common to all the devices:

• MISO (Master In Slave Out) - The Slave line for sending data to the master,
• MOSI (Master Out Slave In) - The Master line for sending data to the peripherals,
• SCK (Serial Clock) - The clock pulses which synchronize data transmission generated by the master
• SS (Slave Select) - the pin on each device that the master can use to enable and disable specific devices.

On Arduino Duemilanove/Uno and compatible boards such as the Nano the pins used are:

  • MOSI - 11 or ICPS 4
  • MISO - 12 or ICPS 1
  • SCK - 13 or ICPS 3
  • SS - 10. You can use other digital pins, but 10 is generally used as it is next to the other SPI pins.

On Arduino Mega1280/2560 the pins are:

  • MOSI - 51 or ICPS 4
  • MISO - 50 or ICPS 1
  • SCK - 52 or ICPS 3
  • SS - 53.

On Arduino Leonardo, the SPI pins are on the ICSP header pins:

  • MOSI - ICSP 4
  • MISO - ICPS 1
  • SCK - ICPS 3

Note that MISO, MOSI, and SCK are available in a consistent physical location on the ICSP header of Arduino boards.

The MAX7219 ICs used on the LED Matrix Driver Module does not fully support the standard SPI protocol. However, it is able to work with the Arduino software and libraries.

Using SPI for the interface between Arduino board and the display allows the entire display to be controlled with only 3 microcontroller I/O lines. Here, we use an Arduino Nano board to drive the display. You may instead use any other Arduino boards as long as the connections to the SPI lines are connected correctly.

Here, the Arduino Nano acts as a master and the display as a slave. As our display will not be sending any data to the master, there is no need to connect the MISO line. So the connections between the Arduino Nano and the displays are MOSI (Pin 11), SCK (Pin 13) and SS (Pin 10) at the Arduino side and Din, CLK and Load pins at the LED Matrix Driver Module respectively.

A HC-05 Bluetooth Wireless Serial Port Module is connected to the TX and RX pin of the Arduino Nano for Bluetooth communications between the display and the Android Smart Phone. The HC-05 module is configurable to operate in master or slave mode but is typically shipped to operate in slave mode which is the mode we need here. This Bluetooth Wireless Serial Port Module is not expensive, easy to work with and is quite easily available from online shops. You may instead use any Bluetooth Wireless Serial Port Modules you are familiar with.

Note that we employed a simple voltage level shift circuit (2Kohms and 1Kohms resistor) between the Arduino Tx pin and the HC-05 Rx pin as our Arduino is running at 5V and our HC-05 Rx pin is supposed to work at the 3.3V level.

Note the use of 10Kohms pull-down resistors on the DATA IN, CLK and LOAD input pins. When power is first applied to the micro-controller or when they are reset, their I/O lines float. The MAX7219 can see this as valid data and display garbage until the micro-controller gains control. The pull-down resistors prevent these problems. To reduce the part count for this project, you may try without the 10Kohms pull-down resistors for the DATA IN and CLK input lines.

Step 3: Arduino Sketch

Instead of using the excellent LedControl library that has been specifically written for the MAX7219, we will be using the SPI library to directly sent instructions and data to the display.

The micro-controller needs to be loaded with the Arduino sketch to run the display.

We used Arduino IDE V1.0.3 for our project. Download the Arduino sketch below which is used for this project. The sketch will work with up to 8 Bi-color LED matrices cascaded together. You may amend and enhance the sketch to suit your project.

Download jolliFactory_8X_Bicolor_ScrollText_SPI_V1_1.ino

** Note that before downloading sketch to the micro-controller, the connections to the TX and RX pins for the HC-05 Bluetooth Wireless Serial Port Module must be removed for the download to be successful.

Step 4: Testing the Display

Picture of Testing the Display

Install the free Bluetooth spp pro Apps onto your Android Smart Phone, power up the display and establish Bluetooth communications between them. Then set up the Bluetooth spp pro Apps buttons for sending messages and commands accordingly.

See some examples of how we set up the configurable 'ClickMe' buttons for testing below:

Btn name: RED
Send val: (100)Scrolling in RED . . .

Btn name: GREEN
Send val: (200)Scrolling in GREEN . . .

Btn name: ORANGE
Send val: (300)Scrolling in ORANGE . . .

Btn name: RED*
Send val: (100)*

Btn name: GREEN*
Send val: (200)*

Btn name: ORANGE*
Send val: (300)*

Btn name: Speed Up
Send val: (00>)*

Btn name: Speed Down
Send val: (00<)*

Btn name: Dimmer
Send val: (0<0)*

Btn name: Brighter
Send val: (0>0)*

Btn name: jolliFactory
Send val: Powered by jolliFactory

Test the display by clicking on the buttons to send messages and commands to the display.

If you do not have a Bluetooth Wireless Serial Port Module connected, you may test the display by sending messages and commands via the Arduino's Serial Monitor.

Step 5: Display Enclosure

Picture of Display Enclosure

We will not delve into the very detail on building the display enclosure here.

We used a 500mm long clear acrylic tube with internal diameter of 64mm. A sheet of black textured vinyl sticker is used to wrap the clear tube with a window cut-out for the LED Matrix displays to be visible.

A 2mm thick flat blue tinted acrylic sheet is cut to size with 60mm height and length to cover the entire LED Matrix display. This is placed in front of the LED matrices to reduce glare.

No screws are used to secure the individual LED Matrix Modules. Corrugated plastic board is cut to size and slotted behind the LED Matrices to create a firm cushion between the LED Matrix Modules and the internal back wall of the tube.

Two plastic tube end caps are used to cover the ends of the enclosure. The Arduino Nano board and Bluetooth wireless Serial Port Module are placed in the internal hollow of one of the plastic tube end caps.

A small flat acrylic sheet is bent using a strip heater to act as a simple base for the display.

The pictures here shows the parts used to build the enclosure, the display partially assembled and the display fully assembled.

There are lots of handy and creative people out there and we are sure you will be able to create better enclosures for the display if you embark with this project.


JurajM9 made it! (author)2017-11-15

Hello everything works fine except when I send some text to serial only

2nd, 4th and 6th LED panels are working ...

Any idea what is happening?

JurajM9 made it! (author)JurajM92017-11-15

(100)Testing SPI example

makes working 1st 3rd 5th and 7th LED matrix

JurajM9 made it! (author)JurajM92017-11-15

And the strangest behavior is when I send

(300)Testing SPI example

1st and 2nd matrices are ok alligned

3rd and 4th are aligned ok but missalligned by 1 letter to 1st and 2nd

the same with 5th and 6th

and the same with 7th which is solo

masteruan (author)2017-08-02

I love this project! I have only 2 module on Arduino UNO. The speed of text is too fast. I can reduce it by modifying the speed variable in the Arduino code (the value is between 0.3 and 0.5). If I write on the serial message the speed like 1 the speed is yet too fast.

masteruan (author)masteruan2017-08-02

I use this:


capcapcap (author)2017-05-13

In my dot matrix, instead of load, clk, etc., it is srck, rck, ser.
So how do I connect?

bayun (author)2016-05-04


i have 3 package of dot matrix like you, how to join all of them with one module bluetooth. so i can setting 3 package of dot matrix in your app android.thx

SâlwaK1 (author)2016-04-18

hi can you send me the code android of sending message to the led matrix please ?

Nejmar (author)2016-03-09

Hi, did you can send me schematic for this pcb ?

jollifactory (author)Nejmar2016-03-11

You may check out the diagram at

kudhel made it! (author)2016-03-08

hello, if i have this device 8x32 led matrix dispaly board and i use adruino mega2560 can try your codes for this device?

jollifactory (author)kudhel2016-03-08


We do not have this display but based on the number of pins on the LED matrix, your display should be a single color display whereas ours is a bi-color LED matrix display. You will not be able to run it using our codes provided here or may have to modify the codes for it to work with your display.

DavidE76 (author)2016-02-05

This is awesome. Is it possible, and easy, to display static text? Or have an easy way to switch between scrolling text and static text? Thanks!

jollifactory (author)DavidE762016-02-05

Yes, but you will need to modify the code. We managed to modify the code to stop scrolling text once it reached the end of the display.

You may get hold of the LED Matrix modules from and try to modify the code yourself. If you tried and is still unable to get, let us know and we will guide you to make it work.

seattle_ice (author)2016-01-30

Can you scroll the text reversed? (Mirror Image)

jollifactory (author)seattle_ice2016-02-01

Yes, but you will need to modify the code. We managed to modify the code for mirrored scrolling text.

BrendonB3 (author)2015-12-01

Is there a way to get the LED Matrix to display different colors such as Yellow or Blue?

jollifactory (author)BrendonB32015-12-01

The LED matrix which goes with the kit set is a Red/Green bi-color module. It can only display in RED, GREEN and ORANGE (when you alternate the turn on and off of RED and GREEN at high speed).

BrendonB3 made it! (author)2015-11-18

We have built the project, and applied the code. So far we have the default scrolling text working, but when trying to display a message with the Serial Monitor we haven't had any success. The same goes for the app.

We are using the Adruino UNO with the Bluetooth Shield(Bluefruit EZ-Link). The app is connecting to the shield and the blue RX led is lighting up when a signal is sent to it.

Any help is greatly appreciated!

jollifactory (author)BrendonB32015-11-18


It should work with the Bluefruit EZ-Link. I cannot see clearly your connections but can you ensure the TX pin on your BT module is connected to the RX pin of the Arduino?

BrendonB3 (author)jollifactory2015-11-23

That was the problem! Thanks for the help!

AlexandruCosor (author)2015-11-08

Hello jollifactory,

I have downloaded the sketch and compiled it on to the Arduino Mega 2560 and tried to run it on 4 LED-Matrix that I bought from you.

The LED-Matrix are connected to pins 51, 52 and 53 on my Arduino.

It doesn't work... :( The LED's are twinkling the whole time.

And they are always on, in green color. Why is this happening?

I need to get the LED-Matrix running for an Project (Battleship for 2 players) at my University.

Please, help me. Thx

If you are using the sketch for this project, you will need to use pin 10 instead of 53 for the slave select / chip select pin (connected to 'Load' on our LED Matrix module) as configured in the sketch as below:

int SPI_CS = 10;// This SPI Chip Select pin controls the MAX7219

TimR34 (author)2015-09-23

I'm looking for a way to daisy-chain dozens of LED screens together. You mention this is limited to 7 chained together. What imposes that limit? And any way to work around this for continued extensibility?

jollifactory (author)TimR342015-09-24

For this project with the Arduino sketch provided here, it should work with a maximum of 8 Bi-color LED Matrix modules chained together without any modifications to the hardware interfacing and the code. If you need to chain more than 8 modules together, you will need to modify the sketch and you will need to take care to provide sufficient power for your entire setup. With too many modules chained together, the text scroll speed may be slowed down significantly. You will need to explore to use a much faster micro-controller than the Arduino Nano/Uno used for this project. We did not experiment with very long displays and so could not share with you our experience.

TimR34 (author)jollifactory2015-09-25

Thanks for the quick reply! Ok, the power issue I definitely understand, but I'm surprised the micro-controller processing speed becomes an problem with such a simple setup. Let's say 32 modules of 8x8 LED's, that's still only 2,048 light pixels that are either on or off (sticking with one color) at any given time. What computationally would cause the slow down? (or is 2,048 on/off actually a lot to handle anywhere?) What board would you recommend over the Arduino Uno for this sort of processing? Thanks again!

jollifactory (author)TimR342015-09-26

Are you thinking of scrolling text across 32 LED Matrix modules daisy-chained as in our project or just showing static text display? It should not be much of a problem if static text with occasional change of text is required. However, scrolling text across 32 modules is quite taxing on the micro-controller with our current wiring setup especially with bi-color LED Matrix modules used here.

Are you familiar with using MAX7219 ICs to drive LED Matrix modules? Our bi-color LED Matrix module uses 2 MAX7219 ICs to drive the display. If you need just one color for display, you may want to purchase other single color LED Matrix modules which uses only one MAX7219 IC and thus scrolling text speed should be faster.

For single color display, you may want to join and check out Parola for Arduino at the Arduino Forum. It should be a much better platform for discussion as the community experimenting with LED matrix displays is very active and huge.

You may want to check out the chipKIT UNO which is price compatible to the Arduino UNO/Nano but is a more powerful micro-controller if you are not satisfy with the text scrolling speed.

TimR34 (author)jollifactory2015-09-28

I am new to LED matrix tinkering, so your direction is very helpful. I'll check out Parola, thanks for the info, cheers!

jollifactory (author)TimR342015-09-29

Parola for Arduino is awesome but works for single color LED Matrix module display. We can easily modify our jolliFactory bi-color LED Matrix modules to single color. We have came up with an instructable using our modules to build a Parola for Arduino Time Message display. You may check it out at

StephanA2 (author)2015-09-22

Could you update this for use with the arduino Due and add a final photo of the circuit so i can simply compare what i've done to your finished product.

jollifactory (author)StephanA22015-09-23

Sorry. I may not be able to help you as I do not have an Arduino Due and is not likely to have one in the near future to test this project with it. You may need to ask for help from other Arduino forums.

Do note that the Arduino Due runs at 3.3V whereas the Arduino Nano we used for this project is runs at 5V. You may need to use a 3.3V to 5V voltage level shifter board between the Due and the Bi-color LED Matrix module for more reliable operation.

You will also need to amend the downloaded sketch for SPI transfer for the Arduino Due.

longhrn84 (author)2015-04-08

are you limited to the preset text functions or can you send a custom message on the fly? My goal would be to add this to my cars rear windshield and display messages to drivers behind me like "move over you're too slow", so I could have some preset but would want the flexibility to make one up as I go. Thoughts?

KOTSOS5 (author)longhrn842015-04-09

you can send messages on the fly my friend, the bluetooth app has a button named "CMD line mode" where you type anything you want once and send it, if you want a saved message which can be sent with a click of a button you can press the button of the app named "Keyboard mode" and save different messages.

KOTSOS5 (author)2015-04-09

Hello i've tried to make your instructable, problem is the default message appears correctly, but when I send a message through my phone or through Usb random matrixes light and the other stay blind. When I restart and your example starts again all matrixes light up correctly and display your message.

KOTSOS5 (author)KOTSOS52015-04-09

Ok I think I see where is the problem but you must help me cause it's a code problem, all matrixes with numbers 2,4,6 light up but matrixes with numbers 1,3,5,7 don't and that's because I use just one color matrxies and not bicolor like you do. So what should I change in code in order to make it work for red matrixes?

LeonardoL2 (author)2015-03-11

excuse me all..

but i'm not so goo in electronics..

i just need the bt controlled led matrix display..

is there someone able to tell me how to get/pay an assembled item?


let me know at


gabe74e (author)2015-03-05

ok for the 10k resistors i cut the wire brn, green and yellow and attached the risitor between and put electric tape around it , here are some pics




jollifactory (author)gabe74e2015-03-05

The wiring is wrong. For example for the pull-down resistor for the LOAD signal, one end of the resistor must be connected to Arduino digital pin 10 (or LOAD signal on first LED Matrix module) and the other end should be connected to GND. With your wrong wiring , one end of the resistor is connected to Arduino digital pin 10 and the other end is connected to LOAD.

A easier way is to solder the pull-down resistor between LOAD and GND on the LED Matrix module itself. Note that you will need to solder to only one of the module. See the attached photo. We will only do this for the LOAD signal as in most cases it works.

gabe74e (author)2015-03-05

alsoon the led martix does it matter which one is J1 because it did not mention as to which one was the first pin on the matrix itself?

jollifactory (author)gabe74e2015-03-05

Yes. It will only work if the LED Matrix is installed correctly but the wrong way will not cause anything to be damaged except that it will not work. It is mentioned here at if you follow my instructable closely to build the LED Matrix module.

gabe74e (author)2015-03-05

ok so i did connect the risistor with gnd and load so here are some pics and it is green at first then just goes to flickering red leds

jollifactory (author)gabe74e2015-03-05

I think you connected the wires for the LOAD and CLK wrongly. The green wire for the CLK should be connected to pin13 instead of 11 if I am not wrong.

gabe74e (author)2015-03-03

oh hey for the text to read out somthing like "happy birthday which part whould insert

on and as well as o triger it on the ssp app pro would their hahve to be any diffrences?

jollifactory (author)gabe74e2015-03-03

You did not mention if you managed to get the default scrolling text displayed when the display is first powered up. Let me know you have succeed with this.

You can just replace the Clickme button set text like 'Scrolling in RED' to 'happy birthday' if you intend to have longer term use to display this message. If it is a one time text message display, you can send it using CMD line mode instead of keyboard mode.

gabe74e (author)jollifactory2015-03-04

How do i connect the 10kohms pull-down resistors for the LOAD, CLK and DIN signal?

jollifactory (author)gabe74e2015-03-04

It is in my previous reply to you. You can connect a pull down resistor for the LOAD signal by connecting the resistor between digital pin 10 and GND at your Arduino side. Try this first and see if it works.

gabe74e (author)2015-03-02

thispart is where i am at could use some help

jollifactory (author)gabe74e2015-03-03

Looks correct. In fact you just need to fill up for BTN Down.

gabe74e (author)jollifactory2015-03-03

so for each setting i just haveto set in the "btn down" for each comand or was it just for "red"?

gabe74e (author)jollifactory2015-03-03

oh ok because i was unsure which one to type on so i just typed on all the btn but ima give it a second try oh and as far as the the resistors can i just strip the wiring and tape them to the wire and insert them to the apporpiate pins on the ardunino?

About This Instructable




More by jollifactory:IKEA Frame Hack > sLOMO (Slow Motion) FrameJolliCube Audio/Music VisualizerJolliCube (8x8x8 LED Cube) with MD_Cubo library
Add instructable to: