diff --git a/README.md b/README.md index 8cdc70e..84aa2fe 100644 --- a/README.md +++ b/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 ----------------------------------------|------------------------------ -![](img/text-ghosting.jpg) |![](img/text-no-ghosting.jpg) +Ghosting with low --led-pwm-lsb-nanoseconds | No ghosting after tweaking +---------------------------------------------|------------------------------ +![](img/text-ghosting.jpg) |![](img/text-no-ghosting.jpg) ### 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= : Panel rows. 8, 16, 32 or 64. (Default: 32). +--led-chain= : Number of daisy-chained panels. (Default: 1). +--led-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=: 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 diff --git a/adapter/passive-3/README.md b/adapter/passive-3/README.md index 4e6c111..b849edc 100644 --- a/adapter/passive-3/README.md +++ b/adapter/passive-3/README.md @@ -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 diff --git a/adapter/passive-rpi1/README.md b/adapter/passive-rpi1/README.md index be79a9b..280c504 100644 --- a/adapter/passive-rpi1/README.md +++ b/adapter/passive-rpi1/README.md @@ -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. diff --git a/examples-api-use/README.md b/examples-api-use/README.md index 460169f..a721212 100644 --- a/examples-api-use/README.md +++ b/examples-api-use/README.md @@ -6,24 +6,25 @@ the display type you have (16x32 or 32x32), and how many you have chained. ``` $ make $ ./demo -Expected required option -D usage: ./demo -D [optional parameter] Options: - -r : Panel rows. '16' for 16x32 (1:8 multiplexing), - '32' for 32x32 (1:16), '8' for 1:4 multiplexing; Default: 32 - -P : For Plus-models or RPi2: parallel chains. 1..3. Default: 1 - -c : Daisy-chained boards. Default: 1. - -L : 'Large' display, composed out of 4 times 32x32 - -p : Bits used for PWM. Something between 1..11 - -l : Don't do luminance correction (CIE1931) - -D : 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 : Run for these number of seconds, then exit. - (if neither -d nor -t are supplied, waits for ) - -b : Sets brightness percent. Default: 100. - -R : Sets the rotation of matrix. Allowed: 0, 90, 180, 270. Default: 0. + -D : Always needs to be set + -t : Run for these number of seconds, then exit. + -R : Sets the rotation of matrix. Allowed: 0, 90, 180, 270. Default: 0. + --led-rows= : Panel rows. 8, 16, 32 or 64. (Default: 32). + --led-chain= : Number of daisy-chained panels. (Default: 1). + --led-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=: 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 ) diff --git a/img/coordinates.png b/img/coordinates.png index e279222..c7e5158 100644 Binary files a/img/coordinates.png and b/img/coordinates.png differ diff --git a/img/coordinates.svg b/img/coordinates.svg index fc155ca..94c55a8 100644 --- a/img/coordinates.svg +++ b/img/coordinates.svg @@ -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"> @@ -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) chain length (-c flag) + xml:space="preserve">chain length (--led-chain flag) + transform="matrix(-3.6732199e-6,-1,1,-3.6732199e-6,988.4269,2736.4018)"> (-P flag) + xml:space="preserve">(--led-parallel flag) (-r flag) + y="1844.9573" + x="3176.5161" + xml:space="preserve">(--led-rows + flag)