Matrix Display

From ElectroDragon
Jump to navigation Jump to search

RPI Hardware Setup HDK

  • Please notice RTC and battery you don't need at beginning
  • Switch can turn to P3 chain side
  • The rest main not used at the beginning.
  • Connect P1 Port to your panel HUB "IN"
  • Connect lab power at least 3-5A 5V to LED panel.
  • Double check your panel specifications, we only support for our type panels. Different panel specification may need revise the code.

Board schematic, Functions

  • To use RTC DS1307, please don't forget to turn on IIC interface in "raspi-config", and switch turn to up.
  • IIC interface can leave on if not used P3, when you only use P2 and P3

Customized Version For Special Need

RPI Software Setup SDK

Main Github

Please ask for software support via github, clone project https://github.com/hzeller/rpi-rgb-led-matrix/tree/master/adapter

Prerequisite Checklist

  • double check turn off SPI IIC, 1-wire, serial, etc in raspi-config
  • turn off sound in /boot/config.txt -> add line dtparam=audio=off
  • optionally install following modules: sudo apt-get remove bluez bluez-firmware pi-bluetooth triggerhappy pigpio
  • optionall added following to disable audio in kernel
cat <<EOF | sudo tee /etc/modprobe.d/blacklist-rgb-matrix.conf
blacklist snd_bcm2835
EOF
sudo update-initramfs -u
  • by following up setup, the GPIO output should be all good

Quick Start Guide

32x16

  • Run example for our selling 32x16 panel:
./examples-api-use/demo -D 0 --led-cols=32 --led-rows=16 --led-multiplexing=8
./examples-api-use/runtext16.ppm -D 0 --led-cols=32 --led-rows=16 --led-multiplexing=8
  • To chain other panel:
 --led-chain=2 to --led-chain=4
  • Other example will have the same configuration
--led-rows=8 --led-chain=2

Other Panels

Working Panel Demo code Panel Specification Command
32x16 P8 or P10 3216 1/4 ./demo -D 0 --led-rows=8 --led-chain=2
32x32 P6 3232 1/8
64x32 P4 NA 1/16
64x64 P4 NA 1/32

Quick Start Guide - Python Bindings

Advanced - Modify Code and Issues

Modify Transformer demo code

  • The code main differences are the transformer.cc transformer.h
  • notice to apply new transformer in your code, for example the demo code, ADD new line at 1163
matrix->ApplyStaticTransformer(rgb_matrix::EDTransformer()) ;
  • compile again -> cd into folder and compile it: make -C example*
  • now can start to run following demo

Apply new transformer

2018-07-16 183343.png
  • Please refer to above 32*16 zip file code, you can search and file EDTransformer() in 3 files
  • add as demo code to -> transformer.cc, before }; name_space rgb_matrix at the end
  • add as demo code to -> transformer.h, before }; name_space rgb_matrix at the end
  • add as demo code to -> led-matrix.cc, there are two lines
  • apply transformer into demo in line 1162~1163 -> matrix->ApplyStaticTransformer(rgb_matrix::P10outdoorTransformer());

2018-07-16 184504.png

Documents

Transormer for 16x32x1/4


int new_x = 0;
int new_y = 0;
if (y < 4 || (y > 7 && y < 12)) {
new_x = (x * -1) + (24 * ((x / 8) + 1)) - 17;
new_y = y;
} else {
new_x = x + (8 * ((x / 8) + 1));
new_y = y - 4;
}
delegatee_->SetPixel(new_x, new_y, red, green, blue);


Transformer canvas part for 32x32x1/8

new_x = ((x / 16) * 32) + (x % 16);
if ((y & 8) == 0) {
new_x += 16;
}
new_y = ((y / 16) * 16) + (y % 8);
  • Also in your transform class have:
int myTransformer::TransformCanvas::width() const {
return delegatee_->width() / 2; }
int myTransformer::TransformCanvas::height() const {
return delegatee_->height() ; }
  • Change the define in framebuffer.cc to SUB_PANELS_ 4 and remake the librgbmatrix library.
  • Try row = 32 and chains = double the number of panels in a chain.

Apply transformer

  • in demo-main.cc on line 1163 after the check for rotation:
matrix->ApplyStaticTransformer(rgb_matrix::Mikro2347Transformer());
sudo ./demo -D 0 --led-no-hardware-pulse --led-rows=16 --led-chain=2

Constant Matrix Drive


Referential Usage Documentation

LED - 5. Raspberry Pi 4 + DietPi Buster + Electrodragon HAT


"RGB Panels, from 192x80, to 384x192, to 384x256 and maybe not much beyond"



Showroom Project

Arduino

ESP8266


PxMatrix Setup

Please double check all the following options

  • #define matrix_width 32
  • #define matrix_height 16


  • display.begin(4); // 1/4, 1/8, 1/16 and 1/32 row scan. where n={4,8,16,32}


  • display.setScanPattern(ZAGGIZ); // Define your scan pattern here
Our panel matrix_width matrix_height Scan Pattern
32x16 32 16 4 ZAGGIZ
64x64 64 64 32 default LINE

Other resources

Library