0 Piece,Product Price: US $ 0
Quantity(Piece/Pieces) | 1 ~ 1000 | >1000 |
Est. Time(days) | 7 | To be negotiated |
If you finish the payment today, your order will ship out within the delivery date.
Raspberry Pi |
RPI-RGB-LED-Matrix |
5V |
VCC |
GND |
GND |
GPIO11(BCM) |
CLK |
GPIO8(BCM) |
CE |
GPIO10(BCM) |
MOSI |
1. After power on and login to system. you can open a terminal and edit /boot/config.txt file to enable SPI function.
sudo vim.tiny /boot/config.txt
and input those parameters:
device_tree=bcm2710-rpi-3-b.dtb
dtparam=spi=on
2.Edit a file named it matrix.c and input following paragraph:
sudo vim.tiny matrix.c
and input those code:
#include <stdio.h>
#include <wiringPi.h>
#include <wiringPiSPI.h>
#include <stdint.h>
#define RED_DATA 0
#define BLUE_DATA 1
#define GREEN_DATA 2
int main(void)
{
static uint8_t data[4] = {0x0,0x0,0x0,0x0};
wiringPiSetup();
wiringPiSPISetup(0,500000);
while(1)
{
static uint8_t heart[8] = {0x00, 0x66, 0xFF, 0xFF, 0xFF, 0x7E, 0x3C, 0x18};
int j;
int x=2;
for ( j=0;j<8;j++)
{
data[0] = ~heart[j];
data[2] = 0xFF;
data[1] = 0xFF;
data[3] = 0x01 << j ;
wiringPiSPIDataRW(0,data,sizeof(data));
delay(x);
};
};
}
3.Compile it and run it.
sudo gcc -o matrix matrix.c -lwiringPi
sudo ./matrix
$7.98~9.98
Min. Order:5
$12.78~15.98
Min. Order:5
$29.28~36.6
Min. Order:5