mirror of
https://github.com/Hopiu/rpi-rgb-led-matrix.git
synced 2026-03-16 22:10:27 +00:00
o First round in updating the documentation.
This commit is contained in:
parent
4eb174866f
commit
5c0bc04a1b
8 changed files with 89 additions and 56 deletions
69
README.md
69
README.md
|
|
@ -52,13 +52,13 @@ Types of Displays
|
|||
There are various types of displays that come all with the same Hub75 connector.
|
||||
They vary in the way the multiplexing is happening.
|
||||
|
||||
Type | Scan Multiplexing | Program Option | Remark
|
||||
-----:|:-----------------:|:----------------|-------
|
||||
64x64 | 1:32 | -r 64 -c 2 | For displays with E line.
|
||||
32x32 | 1:16 | -r 32 |
|
||||
32x64 | 1:16 | -r 32 -c 2 | internally two chained 32x32
|
||||
16x32 | 1:8 | -r 16 |
|
||||
? | 1:4 | -r 8 | (not tested myself)
|
||||
Type | Scan Multiplexing | Program Option | Remark
|
||||
-----:|:-----------------:|:-----------------------------|-------
|
||||
64x64 | 1:32 | --led-rows=64 --led-chain=2 | For displays with E line.
|
||||
32x32 | 1:16 | --led-rows=32 |
|
||||
32x64 | 1:16 | --led-rows=32 --led-chain=2 | internally two chained 32x32
|
||||
16x32 | 1:8 | --led-rows=16 |
|
||||
? | 1:4 | --led-rows=8 | (not tested myself)
|
||||
|
||||
These can be chained by connecting the output of one panel to the input of
|
||||
the next panel. You can chain quite a few together.
|
||||
|
|
@ -104,7 +104,7 @@ Chaining panels
|
|||
We might only have a limited amount of GPIOs on the Raspberry Pi, but luckily,
|
||||
the RGB matrices can be chained. The display panels have an input connector,
|
||||
and also have an output port, that you can connect to the next display in a
|
||||
daisy-chain manner. There is the flag `-c` in the demo program to give number
|
||||
daisy-chain manner. There is the flag `--led-chain` in the demo program to give number
|
||||
of displays that are chained.
|
||||
You end up with a very wide display (chain * 32 pixels).
|
||||
|
||||
|
|
@ -176,38 +176,54 @@ If you encounter this, try these things
|
|||
slow down the GPIO writing a bit. This will of course reduce the
|
||||
frame-rate, so it comes at a cost.
|
||||
|
||||
For GPIO slow-down, the following line in the [lib/Makefile](lib/Makefile)
|
||||
is interesting:
|
||||
|
||||
DEFINES+=-DRGB_SLOWDOWN_GPIO=1
|
||||
For GPIO slow-down, add the flag `--led-slowdown-gpio=2` to the invocation of
|
||||
the binary.
|
||||
|
||||
The default value is 1, if you still have problems, try the value 2. If you
|
||||
know that your display is fast enough, try to comment out that line.
|
||||
know that your display is fast enough, use 0 (zero).
|
||||
|
||||
Then `make` again.
|
||||
|
||||
### Ghosting
|
||||
Some panels have trouble with sharp contrasts and short pulses that results
|
||||
in ghosting. It is particularly apparent with very sharp contrasts, such as
|
||||
bright text on black background. This can be improved by tweaking the `LSB_PWM_NANOSECONDS`
|
||||
parameter in [lib/Makefile](./lib/Makefile). See description there for details.
|
||||
bright text on black background. This can be improved by tweaking the
|
||||
`--led-pwm-lsb-nanoseconds` parameter.
|
||||
|
||||
The following example is a little exaggerated:
|
||||
|
||||
Ghosting with low LSB_PWM_NANOSECONDS | No ghosting after tweaking
|
||||
---------------------------------------|------------------------------
|
||||
 |
|
||||
Ghosting with low --led-pwm-lsb-nanoseconds | No ghosting after tweaking
|
||||
---------------------------------------------|------------------------------
|
||||
 |
|
||||
|
||||
### Inverted Colors ?
|
||||
|
||||
There are some displays out there that use inverse logic for the colors. You
|
||||
notice that your image looks like a 'negative'. The parameter to tweak is
|
||||
`INVERSE_RGB_DISPLAY_COLORS` in [lib/Makefile](./lib/Makefile).
|
||||
`--led-inverse`.
|
||||
|
||||
### Check configuration in lib/Makefile
|
||||
### Check configuration via command line flags.
|
||||
|
||||
There are lots of parameters in [lib/Makefile](./lib/Makefile) that you might
|
||||
be interested in tweaking.
|
||||
There are lots of parameters exposed as command line flags.
|
||||
```
|
||||
# These are the most important
|
||||
--led-rows=<rows> : Panel rows. 8, 16, 32 or 64. (Default: 32).
|
||||
--led-chain=<chained> : Number of daisy-chained panels. (Default: 1).
|
||||
--led-parallel=<parallel> : For A/B+ models or RPi2,3b: parallel chains. range=1..3 (Default: 1).
|
||||
|
||||
# These are for tweaking
|
||||
--led-pwm-bits=<1..11> : PWM bits (Default: 11).
|
||||
--led-brightness=<percent>: Brightness in percent (Default: 100).
|
||||
--led-scan-mode=<0..1> : 0 = progressive; 1 = interlaced (Default: 0).
|
||||
--led-show-refresh : Show refresh rate.
|
||||
--led-inverse : Switch if your matrix has inverse colors on.
|
||||
--led-swap-green-blue : Switch if your matrix has green/blue swapped on.
|
||||
--led-pwm-lsb-nanoseconds : PWM Nanoseconds for LSB (Default: 130)
|
||||
--led-no-hardware-pulse : Don't use hardware pin-pulse generation.
|
||||
--led-slowdown-gpio=<0..2>: Slowdown GPIO. Needed for faster Pis and/or slower panels (Default: 1).
|
||||
--led-daemon : Make the process run in the background as daemon.
|
||||
--led-no-drop-privs : Don't drop privileges from 'root' after initializing the hardware.
|
||||
```
|
||||
|
||||
If you have an Adafruit HAT
|
||||
---------------------------
|
||||
|
|
@ -227,14 +243,13 @@ The Adafruit HAT uses a modified pinout, so they forked this library and
|
|||
modified the pinout there. However, that fork is _ancient_, so I strongly
|
||||
suggest to use this original library instead.
|
||||
|
||||
In this library here, you have to uncomment the following line in
|
||||
the [lib/Makefile](./lib/Makefile)
|
||||
In this library here, you can choose the Adafruit HAT pinout by editing
|
||||
`lib/Makefile` and change `HARDWARE_DESC?=regular` to `HARDWARE_DESC=adafruit-hat`.
|
||||
|
||||
Alternatively, you can prefix the compilation call with this variable like so:
|
||||
```
|
||||
#DEFINES+=-DADAFRUIT_RGBMATRIX_HAT
|
||||
HARDWARE_DESC=adafruit-hat make
|
||||
```
|
||||
Uncommenting means: remove the `#` in front of that line.
|
||||
|
||||
Then re-compile and a display connected to the HAT should work.
|
||||
|
||||
### Improving flicker
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Adapter PCB to support up to 3 panel chains
|
||||
===========================================
|
||||
|
||||
* Passive board. Simple, but might need to define `RGB_SLOWDOWN_GPIO` if you see
|
||||
* Passive board. Simple, but might need to define `--led-slowdown-gpio` if you see
|
||||
glitches. Consider using the [active board](../active-3) in that case.
|
||||
* Only really advisable, if the LED panels have 74HCT245 (as opposed to just
|
||||
74HC245) in their input stage, because then they can deal properly with
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Adapter PCB to connect to Rasbperry Pi1
|
||||
=======================================
|
||||
|
||||
* Passive board. Simple, but might need to define `RGB_SLOWDOWN_GPIO` if you see
|
||||
* Passive board. Simple, but might need to define `--led-slowdown-gpio` if you see
|
||||
glitches.
|
||||
* Supports one panel connected to a 26 pin Raspberry Pi 1. If you have a newer RPi,
|
||||
check out the [Passive 3](../passive-3) or [Active 3](../active-3) adapter.
|
||||
|
|
|
|||
|
|
@ -6,24 +6,25 @@ the display type you have (16x32 or 32x32), and how many you have chained.
|
|||
```
|
||||
$ make
|
||||
$ ./demo
|
||||
Expected required option -D <demo>
|
||||
usage: ./demo <options> -D <demo-nr> [optional parameter]
|
||||
Options:
|
||||
-r <rows> : Panel rows. '16' for 16x32 (1:8 multiplexing),
|
||||
'32' for 32x32 (1:16), '8' for 1:4 multiplexing; Default: 32
|
||||
-P <parallel> : For Plus-models or RPi2: parallel chains. 1..3. Default: 1
|
||||
-c <chained> : Daisy-chained boards. Default: 1.
|
||||
-L : 'Large' display, composed out of 4 times 32x32
|
||||
-p <pwm-bits> : Bits used for PWM. Something between 1..11
|
||||
-l : Don't do luminance correction (CIE1931)
|
||||
-D <demo-nr> : Always needs to be set
|
||||
-d : run as daemon. Use this when starting in
|
||||
/etc/init.d, but also when running without
|
||||
terminal (e.g. cron).
|
||||
-t <seconds> : Run for these number of seconds, then exit.
|
||||
(if neither -d nor -t are supplied, waits for <RETURN>)
|
||||
-b <brightnes>: Sets brightness percent. Default: 100.
|
||||
-R <rotation> : Sets the rotation of matrix. Allowed: 0, 90, 180, 270. Default: 0.
|
||||
-D <demo-nr> : Always needs to be set
|
||||
-t <seconds> : Run for these number of seconds, then exit.
|
||||
-R <rotation> : Sets the rotation of matrix. Allowed: 0, 90, 180, 270. Default: 0.
|
||||
--led-rows=<rows> : Panel rows. 8, 16, 32 or 64. (Default: 32).
|
||||
--led-chain=<chained> : Number of daisy-chained panels. (Default: 1).
|
||||
--led-parallel=<parallel> : For A/B+ models or RPi2,3b: parallel chains. range=1..3 (Default: 1).
|
||||
--led-pwm-bits=<1..11> : PWM bits (Default: 11).
|
||||
--led-brightness=<percent>: Brightness in percent (Default: 100).
|
||||
--led-scan-mode=<0..1> : 0 = progressive; 1 = interlaced (Default: 0).
|
||||
--led-show-refresh : Show refresh rate.
|
||||
--led-inverse : Switch if your matrix has inverse colors on.
|
||||
--led-swap-green-blue : Switch if your matrix has green/blue swapped on.
|
||||
--led-pwm-lsb-nanoseconds : PWM Nanoseconds for LSB (Default: 130)
|
||||
--led-no-hardware-pulse : Don't use hardware pin-pulse generation.
|
||||
--led-slowdown-gpio=<0..2>: Slowdown GPIO. Needed for faster Pis and/or slower panels (Default: 1).
|
||||
--led-daemon : Make the process run in the background as daemon.
|
||||
--led-no-drop-privs : Don't drop privileges from 'root' after initializing the hardware.
|
||||
Demos, choosen with -D
|
||||
0 - some rotating square
|
||||
1 - forward scrolling an image (-m <scroll-ms>)
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 62 KiB |
|
|
@ -19,7 +19,7 @@
|
|||
viewBox="47 979 6532 2919"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="coordinates.svg">
|
||||
<metadata
|
||||
id="metadata126">
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
showgrid="false"
|
||||
inkscape:zoom="1.8506993"
|
||||
inkscape:cx="247.15083"
|
||||
inkscape:cy="105.30809"
|
||||
inkscape:cy="148.53499"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
|
|
@ -373,7 +373,7 @@
|
|||
font-weight="normal"
|
||||
font-style="normal"
|
||||
y="3838.4653"
|
||||
x="3555.1394"
|
||||
x="3420.0002"
|
||||
xml:space="preserve">(32 * chain_length - 1, rows * parallel - 1)</text>
|
||||
<text
|
||||
style="font-style:normal;font-weight:normal;font-size:152px;font-family:Helvetica;text-anchor:middle;fill:#000000;stroke-width:0.025in"
|
||||
|
|
@ -383,11 +383,11 @@
|
|||
font-style="normal"
|
||||
y="1151.4386"
|
||||
x="3139.2725"
|
||||
xml:space="preserve">chain length (-c flag)</text>
|
||||
xml:space="preserve">chain length (--led-chain flag)</text>
|
||||
<g
|
||||
style="fill:none;stroke-width:0.025in"
|
||||
id="g110"
|
||||
transform="matrix(-3.6732199e-6,-1,1,-3.6732199e-6,988.4269,2574.235)">
|
||||
transform="matrix(-3.6732199e-6,-1,1,-3.6732199e-6,988.4269,2736.4018)">
|
||||
<text
|
||||
style="font-style:normal;font-weight:normal;font-size:152px;font-family:Helvetica;text-anchor:middle;fill:#000000"
|
||||
id="text112"
|
||||
|
|
@ -396,7 +396,7 @@
|
|||
font-style="normal"
|
||||
y="0"
|
||||
x="0"
|
||||
xml:space="preserve">(-P flag)</text>
|
||||
xml:space="preserve">(--led-parallel flag)</text>
|
||||
</g>
|
||||
<text
|
||||
style="font-style:normal;font-weight:normal;font-size:126px;font-family:Helvetica;text-anchor:middle;fill:#000000;stroke-width:0.025in"
|
||||
|
|
@ -481,9 +481,18 @@
|
|||
font-size="126"
|
||||
font-weight="normal"
|
||||
font-style="normal"
|
||||
y="1849.521"
|
||||
x="3260.4895"
|
||||
xml:space="preserve">(-r flag) </text>
|
||||
y="1844.9573"
|
||||
x="3176.5161"
|
||||
xml:space="preserve">(--led-rows</text>
|
||||
<text
|
||||
style="font-style:normal;font-weight:normal;font-size:101.35415649px;font-family:Helvetica;text-anchor:start;fill:#000000;stroke-width:0.025in"
|
||||
font-size="126"
|
||||
font-weight="normal"
|
||||
font-style="normal"
|
||||
y="1944.4476"
|
||||
x="3307.9529"
|
||||
xml:space="preserve"
|
||||
id="text3403"> flag) </text>
|
||||
<g
|
||||
style="fill:none;stroke-width:0.025in"
|
||||
id="g110-5"
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 59 KiB |
|
|
@ -31,20 +31,24 @@ HARDWARE_DESC?=regular
|
|||
|
||||
# If you see that your display is inverse, you might have a matrix variant
|
||||
# has uses inverse logic for the RGB bits. In that case: uncomment this.
|
||||
# Flag: --led-inverse
|
||||
#DEFINES+=-DINVERSE_RGB_DISPLAY_COLORS
|
||||
|
||||
# Some panels out there seem to have Green and Blue swapped (even though the
|
||||
# writing on connector looks correct). This option will swap these colors if
|
||||
# you happen to have gotten such panel.
|
||||
# Flag: --led-swap-green-blue
|
||||
#DEFINES+=-DRGB_SWAP_GREEN_BLUE
|
||||
|
||||
# For curiosity reasons and while tweaking values for LSB_PWM_NANOSECONDS,
|
||||
# uncomment to see refresh rate in terminal.
|
||||
# Flag: --led-show-refresh
|
||||
#DEFINES+=-DSHOW_REFRESH_RATE
|
||||
|
||||
# For low refresh rates below 100Hz (e.g. a lot of panels), the eye will notice
|
||||
# some flicker. With this option enabled, the refreshed lines are interleaved,
|
||||
# so it is less noticeable. But looks less pleasant with fast eye movements.
|
||||
# Flag: --led-scan-mode=1
|
||||
#DEFINES+=-DRGB_SCAN_INTERLACED=1
|
||||
|
||||
# The signal can be too fast for some LED panels, in particular with newer
|
||||
|
|
@ -60,6 +64,7 @@ HARDWARE_DESC?=regular
|
|||
# particularly slow panels or bad signal cable situations. If that happens, you
|
||||
# typically should double check cables and add TTL level converter if you
|
||||
# haven't.
|
||||
# Flag: --led-slowdown-gpio
|
||||
#DEFINES+=-DRGB_SLOWDOWN_GPIO=1
|
||||
|
||||
# This allows to change the base time-unit for the on-time in the lowest
|
||||
|
|
@ -80,6 +85,7 @@ HARDWARE_DESC?=regular
|
|||
# ghosting in high-contrast applications (e.g. text), increase the value.
|
||||
# If you want to tweak, watch the framerate (-DSHOW_FRAME_RATE) while playing
|
||||
# with this number and the PWM values.
|
||||
# Flag: --led-pwm-lsb-nanoseconds
|
||||
#DEFINES+=-DLSB_PWM_NANOSECONDS=130
|
||||
|
||||
# ------------ Pinout options; usually no change needed here --------------
|
||||
|
|
@ -95,7 +101,7 @@ HARDWARE_DESC?=regular
|
|||
#DEFINES+=-DADAFRUIT_RGBMATRIX_HAT_PWM
|
||||
|
||||
# If you use HARDWARE_DESC=classic and a Raspberry Pi 1, Revision A,
|
||||
# this might be useful.
|
||||
# this might be useful (untested).
|
||||
#DEFINES+=-DPI_REV1_RGB_PINOUT
|
||||
|
||||
# Typically, a Hub75 panel is split in two half displays, so that a 1:16
|
||||
|
|
@ -112,6 +118,7 @@ HARDWARE_DESC?=regular
|
|||
# interference. Note, you typically don't want the hardware pulses disabled, as
|
||||
# the image will have visible brightness glitches; but for debugging, this is
|
||||
# a good choice.
|
||||
# Flag: --led-no-hardware-pulses
|
||||
#DEFINES+=-DDISABLE_HARDWARE_PULSES
|
||||
|
||||
# If someone gives additional values on the make commandline e.g.
|
||||
|
|
|
|||
|
|
@ -13,4 +13,5 @@ Then, you can run it with any common image format, including animated gifs:
|
|||
sudo ./led-image-viewer myimage.gif
|
||||
|
||||
It also supports the standard options to specify the connected
|
||||
displays (`-r`, `-c`, `-P`).
|
||||
displays (e.g. `--led-rows`, `--led-chain`, `--led-parallel` but also many more tweak
|
||||
flags).
|
||||
|
|
|
|||
Loading…
Reference in a new issue