polyfloyd / ledcat

Control lots of LED's over lots of protocols
GNU General Public License v3.0
102 stars 6 forks source link

Led matrix with HUB75 connector, 64x64, 1/32 scan, only A and B #6

Closed maitredede closed 6 years ago

maitredede commented 6 years ago

Hi,

I am trying to use ledcat with a HUB75 led matrix, 64x64, 1/32 scan. I found there was 1/32 scan panels that had ABCDE lines, but mine has only A, B lines, and a NC line.

I am trying to drive it with this script :

while true; do
    convert -background black -fill cyan -font Courier -pointsize 8 \
        -size 64x64 -gravity center -depth 8 caption:"$(date +%T)" RGB:-
    sleep 1;
done | target/release/ledcat --geometry 64x64 hub75 --level-select 22,23 --red 11,8 --green 27,9 --blue 7,10 --clock 17 --latch 4 --output-enable 18;

But all I have is :

pi@raspberrypi:~/ledcat $ sudo ./test.sh
thread 'main' panicked at 'Invalid bitfield returned by fcntl(F_GETFL)', /checkout/src/libcore/option.rs:819:4
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:380
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:396
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:611
   5: std::panicking::begin_panic_new
             at /checkout/src/libstd/panicking.rs:553
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:521
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:497
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:92
   9: core::option::expect_failed
             at /checkout/src/libcore/option.rs:819
  10: <&'a mut I as core::iter::iterator::Iterator>::next
  11: ledcat::main
  12: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
  13: std::rt::lang_start
             at /checkout/src/libstd/panicking.rs:458
             at /checkout/src/libstd/panic.rs:361
             at /checkout/src/libstd/rt.rs:59
  14: __libc_start_main
polyfloyd commented 6 years ago

Thanks for reporting the issue. :) Since 28907cdd653e2541e8b4cdac824cc402869af43b should fix the panic, I'm closing this issue.

But a 1/32 panel with only two level selects seems a bit odd. I'd expect them to have log2(32) = 5 pins as well, not 2. The NC label usually means "Not Connected". I'm interested in your experiences with this panel.

maitredede commented 6 years ago

I am trying to reverse engineer this panel, but so far, I didn't managed to something... For example : the expected result : https://www.youtube.com/watch?v=PgK4qTQV-rE What I have : https://youtu.be/lv6C89j0i1M Some of the progress I made : https://github.com/hzeller/rpi-rgb-led-matrix/issues/120

maitredede commented 6 years ago

@polyfloyd with your fix, ledcat shows noting. I don't have other panels to test.

polyfloyd commented 6 years ago

Ledcat assumes that a 1/32 panel has 5 level select pins. Your panel seems to have an implementation of a hub75 interface that I have not encountered myself.

Could you find out what kind of IC is connected to the A and B pins? Is it really a level selector and not something else?

sebastius commented 6 years ago

https://github.com/hzeller/rpi-rgb-led-matrix/issues/120 < These guys are also working on the same display, might want to get inspiration there?