[Banana pi Accessories] BPI-RGB-LED-Matrix Expansion Module and How to use

1 Product Specification:

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:

Full color RGB variation Square LED point source Ultrathin Plug and Play No wire needed

4 Port:

Banana Pi connection port

5 Product Parameters:

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

6 Typical Application

Scroll the display LOGO display Dynamic signage

7 How to use :

you need this two :

at fisrt

gpio load spi

code file name : rgbspi.c

gcc -Wall -o rgbspi rgbspi.c -lwiringPi

run it:

.\rgbspi 

code :

#include <wiringPi.h>
#include <wiringPiSPI.h>
 
unsigned char elscode[24] = {
    0x30, 0x30, 0x30, 0x18, 0x18, 0x18,
    0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0,
    0x01, 0xc0, 0x81, 0x07, 0xe6, 0x81,
    0x0f, 0x42, 0x21, 0x0f, 0x02, 0x71
};
unsigned char cleancode[4] = {0x00, 0x00, 0x00, 0x00};
 
int main(void)
{
    int i,k;
    unsigned char buffer[4] = {0x25, 0xFF, 0x7F, 0xF0};
    wiringPiSetup();
    wiringPiSPISetup(0, 1);
 
    wiringPiSPIDataRW(0, cleancode, 4);
    delay(1000);
 
    while(1)
    {
        k=0;
        for(i=1;i<256;i*=2)
        {
            buffer[0]=i;
            buffer[1]=0xff-elscode[k+2];
            buffer[2]=0xff;
            buffer[3]=0xff;
            wiringPiSPIDataRW(0, buffer, 4);
            buffer[0]=i;
            buffer[1]=0xff;
            buffer[2]=0xff-elscode[k+1];
            buffer[3]=0xff;
            wiringPiSPIDataRW(0, buffer, 4);
            buffer[0]=i;
            buffer[1]=0xff;
            buffer[2]=0xff;
            buffer[3]=0xff-elscode[k+0];
            wiringPiSPIDataRW(0, buffer, 4);
            k+=3;
        }
    }
}

haha. running: