# BPI 8\*8 RGB LED Matrix Expansion Module

Front :

![](/files/-M2HXIWV2VItzq0n1-kj)

Back:

![](/files/-M2HXIWXgqDMMH2U5aK7)

**1.Product Specification：**

![](/files/-M2HXIWZOVBHy8VYh4A-)

**2. Produce Overview：**

The Matrix LED module is specifically designed for Banana Pi. The module with 8X8 Matrix LED. User can custom display content through programming. Pay attention, the module do not include driver board. You have to cooperate with Infinity cascade IO expand module

**3. Produce Features：**

1. Full color RGB&#x20;
2. Square LED point source
3. Ultrathin
4. Plug and Play
5. No wire needed

**4. Port：**

need work with IO extend module.

![](/files/-M2HXIWa8NOnqikYQUmW)

Banana Pi connection port，also can use on raspberry pi.

**5.Product Parameters：**

1. Dot Size: 5.0mm
2. Pixel Array: 8×8
3. Luminous Intensity: 40mcd
4. Package Dimension: 60mm×60mm
5. Reverse Voltage(Max): 5V
6. Forward Current(Max): 25mA
7. Peak Forward Current(Max): 100mA
8. Power Dissipation(Max): 100mW
9. Operating Temperature(Max):-35\~+85℃
10. Storage Temperature(Max): -35\~+85℃
11. Lead Solder Temperature(Max): 260℃ for 5 seconds

**6. Typical Application：**

1. Scroll the display
2. LOGO display
3. Dynamic signage

**7. How to use on BPI-M1：**

For the Banana Pi ,just Insert these two module like the picture Below

![](/files/-M2HXIWcCAOG85FNBt3v)

**7. How to use on BPI-M3：**

OS: BPI-M3 Ubuntu15.10 (Kernel3.4)

Version: 1.0 HDMI

![](https://github.com/bananapi/bpi-accessories/tree/dfcb7618db59218afda3d0ab0167faab83ecacc4/zh/ON%20m3.jpg)

Step 1: Download WiringPI

```
$ git clone https://github.com/BPI-SINOVOIP/BPI-WiringPi.git1 -b BPI_M3
$ cd BPI-WiringPi
$ chmod +x ./build
$ sudo ./build
```

Step 2 : Copy smaple code to Blue\_RGB8\*8.c file

`$ sudo vi Blue_RGB8*8.c`

Step 3 : Compile Blue\_RGB8\*8.c

`$ gcc -o Blue_RGB8*8 Blue_RGB8*8.c -l wiringPi`

Step 4: Run Blue\_RGB8\*8

`$ sudo ./Blue_RGB8*8`

**youtube Video Demo how to install hardware:**

<https://www.youtube.com/watch?v=K6mRB_CtOlI&feature=youtu.be>

**youtube Video Demo for display :**

<https://www.youtube.com/watch?v=ynxjzZiSGDo>

**Sample Code:**

```
#include <stdio.h>
#include <wiringPi.h>
#include <sr595.h>

#define SPACE { \
    {0, 0, 0, 0, 0, 0, 0, 0},  \
    {0, 0, 0, 0, 0, 0, 0, 0}, \
    {0, 0, 0, 0, 0, 0, 0, 0}, \
    {0, 0, 0, 0, 0, 0, 0, 0}, \
    {0, 0, 0, 0, 0, 0, 0, 0}, \
    {0, 0, 0, 0, 0, 0, 0, 0}, \
    {0, 0, 0, 0, 0, 0, 0, 0}, \
    {0, 0, 0, 0, 0, 0, 0, 0} \
}

#define FULL { \
    {1, 1, 1, 1, 1, 1, 1, 1}, \
    {1, 1, 1, 1, 1, 1, 1, 1}, \
    {1, 1, 1, 1, 1, 1, 1, 1}, \
    {1, 1, 1, 1, 1, 1, 1, 1}, \
    {1, 1, 1, 1, 1, 1, 1, 1}, \
    {1, 1, 1, 1, 1, 1, 1, 1}, \
    {1, 1, 1, 1, 1, 1, 1, 1}, \
    {1, 1, 1, 1, 1, 1, 1, 1} \
}

#define H { \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 1, 1, 1, 1, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}  \
}

#define E  { \
    {0, 1, 1, 1, 1, 1, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 1, 1, 1, 1, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 1, 1, 1, 1, 1, 0}  \
}

#define L { \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 0, 0}, \
    {0, 1, 1, 1, 1, 1, 1, 0}  \
}

#define O { \
    {0, 0, 0, 1, 1, 0, 0, 0}, \
    {0, 0, 1, 0, 0, 1, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 0, 1, 0, 0, 1, 0, 0}, \
    {0, 0, 0, 1, 1, 0, 0, 0}  \
}

#define Smile { \
    {0, 0, 1, 1, 1, 1, 0, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {1, 0, 1, 0, 0, 1, 0, 1}, \
    {1, 0, 0, 0, 0, 0, 0, 1}, \
    {1, 0, 1, 0, 0, 1, 0, 1}, \
    {1, 0, 0, 1, 1, 0, 0, 1}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 0, 1, 1, 1, 1, 0, 0}  \
}
#define Line { \
    {1, 0, 0, 0, 0, 0, 0, 0},  \
    {0, 1, 0, 0, 0, 0, 0, 0},  \
    {0, 0, 1, 0, 0, 0, 0, 0},  \
    {0, 0, 0, 1, 0, 0, 0, 0},  \
    {0, 0, 0, 0, 1, 0, 0, 0},  \
    {0, 0, 0, 0, 0, 1, 0, 0},  \
    {0, 0, 0, 0, 0, 0, 1, 0},  \
    {0, 0, 0, 0, 0, 0, 0, 1},  \
}

int RowRed[8]={116,117,118,119,120,121,122,123};
int RowGreen[8]={108,109,110,111,112,113,114,115};
int RowBlue[8]={100,101,102,103,104,105,106,107};
int Column[8]={124,125,126,127,128,129,130,131};


void MatrixSetup()
{
    int j;
    for(j = 0; j < 32; j++)
    {
        pinMode(100 + j, OUTPUT);
    }
    for(j = 0; j < 8; j++)
    {
        digitalWrite(100 + j, 1);
    }
    for(j = 0; j < 8; j++)
    {
        digitalWrite(116 + j, 1);
    }
    for(j = 0; j < 8; j++)
    {
        digitalWrite(108 + j, 1);
    }
}
void Clear()
{
    int i;
    for(i=0;i<8;i++)
    {
        digitalWrite(RowRed[i],1);
        digitalWrite(RowGreen[i],1);
        digitalWrite(RowBlue[i],1);
        digitalWrite(Column[i],0);
    }


}
int main(int argc, char *argv[])
{
    int column, row, thisPixel;
    long long k;
    wiringPiSetup();
    sr595Setup(100, 32, 12, 14, 10);
    MatrixSetup();
    int matrix[8][8]= Smile ;
    while(1)
    {
        Clear();
        for(column=0;column<8;column++)
        {
            digitalWrite(Column[column],1);
            for(row=0;row<8;row++)
            {
                if(matrix[column][row] == 1)
                    digitalWrite(RowBlue[row],0);  // Blue color
                digitalWrite(RowBlue[row],1);      // Blue color
            }
            digitalWrite(Column[column],0);
        }
    }
}
```

**Link to BPI forum:**

<http://forum.banana-pi.org/t/bpi-m3-bpi-8x8-led-matrix-module-and-how-to-use/1096>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bananapi.gitbook.io/bpi-accessories/zh/rgbledmatrixmodule.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
