# Matedisplay RGB LED Display aus 42 ClubMate-Kisten und 840 ClubMate Flaschen https://cloud.c3re.de/apps/files/?dir=/c3re.de_Chaostreff/2_Projects/MateDisplay x(Breite) * y(Höhe) 1 Kiste : 5 x 4 Flaschen Display: 6 x 7 Kisten = 42 Kisten, 30 x 28 = 840 pixel Verkabelung: 6 Säulen, pro Säule: 1 Schlange: 7 Kisten hoch * 20 Pixel = 140 LEDs lange Schlange pro Säule Strom: 840 x 60mA = 50A@5V = 250W peak (alle Pixel weiss, volle Helligkeit) ![](https://www.23hq.com/23666/97948710_5534c96f392497003add059246b7c570_standard.jpg) ![](https://www.23hq.com/23666/97934407_75e2d2b33922f9d732d8bf3b2a012729_standard.jpg) ## Software: ### Jinx (Windows oder wine) .. kann output über mehrere USB-serial Geräte gleichzeitig * http://www.live-leds.de/ * http://www.live-leds.de/user-jinxscripts/ * cd ~/download/jinx2.4/jinx ; wine jinx.exe (Mono) ### Glediator ..kann Text oder Bilder live rotieren & zoomen * http://www.solderlab.de ist down :-( * cd c3re/flexi/glediator/ ; ./start-gled.sh * Glediator 3: "Unofficial port (reverse engineer) of the Glediator LED Matrix controlling software" https://github.com/mrfaptastic/Glediator3 ### PixelController.jar ...kann u.a. Blinkenlights Dateien abspielen. Prinzip: Graustufen-Effekt + Farb Paletten? * https://github.com/neophob/PixelController * c3re/flexi/pixelcontroller-distribution-2.1.0-RC1 * cd ... ; /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar *.jar ### matrixmover * Version 0.4 https://github.com/McGyver666/MatrixMover/ ### ATCE Artnet to TPM2 Converter + Editor http://www.tlhome.de/ATCE.htm ### Chamsys MagiQ https://chamsyslighting.com/pages/pixel-map ### xLights https://xlights.org/ ...is a free and open source program that enables you to design, create and play amazing lighting displays through the use of DMX controllers, E1.31 Ethernet controllers and more. ### LEDfx rpimonitor und ledfx benutzen beide port 8888! ## Hardware-Controller Ideen: Unser aktueller Controller ist ein LED Player M: https://www.led-genial.de/LED-Player-M-fuer-Stripes-und-Panels-bis-2048-LEDs TPM2 Input via mini-USB oder micro-SD Karte. Patch Mode: Linewise starting Top-Left Pixel Order: RGB ``` [5455602.204387] usb 1-1: Product: LED-PLAYER M [5455602.204397] usb 1-1: Manufacturer: DIAMEX GmbH [5455602.204408] usb 1-1: SerialNumber: 19322-20816-880 [5455602.206864] usbhid 1-1:1.0: couldn't find an input interrupt endpoint [5455602.207525] cdc_acm 1-1:1.1: ttyACM0: USB ACM device ``` Raspberry mit einem oder mehreren GPIOs: robust? timing? Teensy 3.x oder Teensy LC (ARM, arduino IDE, ca 20€) https://www.pjrc.com/store/teensy32.html , https://www.adafruit.com/product/2419 $14 https://www.adafruit.com/product/1779 "A CAT6 Ethernet cable is used to connect this board to the LED strips. A CAT6 cable is designed for very high bandwidth, minimal cross-talk between twisted pairs, and 100 ohm impedance, for a very high quality signal." esp8266 schafft >840 LEDs mit der Fastled Lib bei 30 FPS https://github.com/FastLED/FastLED/issues/288 ... hab ich mit ws2812fx_auto_mode_cycle840px und 313 LEDs getestet. "1024 WS2812B LEDs spoken to at 800 kHz will give you 30 FPS" esp8266 kann per WLAN oder USB-seriell betrieben werden https://www.pjrc.com/teensy/td_libs_OctoWS2811.html OctoWS2811 is a high performance WS2811 & WS2812 & WS2812B LED library, written by Paul Stoffregen, featuring **simultaneous update to 8 LED strips** using efficient DMA-based data transfer (Teensy 3.x) https://github.com/PaulStoffregen/OctoWS2811/blob/master/examples/PixelInvaders/PixelInvaders.ino https://github.com/PaulStoffregen/OctoWS2811/blob/master/examples/Glediator/Glediator.ino http://docs.pixelmatix.com/SmartMatrix/ arduino library für ArtNet: https://github.com/hideakitai/ArtNet ---- ## Werkzeug: Cable feeder aka "Kabelschieberino" https://fudemotor.en.made-in-china.com/product/qjsQGCwPARWT/China-42SHD0001-24B-High-Torque-12V-DC-NEMA-17-Stepper-Motor-for-3D-Printer.html 0,4 A bei 12V 30 Ohm https://www.instructables.com/id/Controll-a-Stepper-Motor-With-the-DRV8825/ $Nextcloud/Chaostreff/Workshops/arduino/kabelschieberino ---- ## RaspberryPi Zero W als USB-IP gateway https://derushadigital.com/other%20projects/2019/02/19/RPi-USBIP-ZWave.html ``` ln -sf /var/lib/usbutils/usb.ids /usr/share/hwdata/ vi /lib/systemd/system/usbipd.service <- hier USB ID eintragen ``` auf dem Client: ``` ln -sf /dev/ttyACM0 /dev/ttyS7 usbip port Imported USB devices: Port 00: <Port in Use> at Full Speed(12Mbps) QinHeng Electronics : HL-340 USB-Serial adapter (1a86:7523) 3-1 -> usbip://192.168.8.121:3240/1-1 -> remote bus/dev 001/002 ``` 08.12.2020: Glediator mit TPM2 auf ttyUSB0 hat funktioniert. :+1: 13.12.2020: Es klappt auch durch openvpn hindurch.:+1::+1: 09.01.2022: ...Auch durch wireguard. Super Framerate auf dem Display :+1::+1::+1: 21.01.2022: mit wine+Jinx geht das nicht, auch nicht im LAN ohne VPN Steckdose: http://10.2.3.170/ RaspberryPi mit USB-Verbindung zum Matedisplay: ssh pi@10.2.3.174 Hüttencam: http://10.2.3.11/ /lib/systemd/system/usbip.service (Client) ``` [Unit] Description=usbip client After=network.target [Service] Type=oneshot RemainAfterExit=yes ExecStart=/bin/sh -c "/usr/lib/linux-tools/$(uname -r)/usbip attach -r 10.2.3.174 -b $(/usr/lib/linux-tools/$(uname -r)/usbip list -r 10.2.3.174 | grep '16c0:2ab5' | cut -d: -f1)" ExecStop=/bin/sh -c "/usr/lib/linux-tools/$(uname -r)/usbip detach --port=$(/usr/lib/linux-tools/$(uname -r)/usbip port | grep '<Port in Use>' | sed -E 's/^Port ([0-9][0-9]).*/\1/')" [Install] WantedBy=multi-user.target ``` ``` WARNING: usbip not found for kernel 5.9.0-050900 You may need to install the following packages for this specific kernel: linux-tools-5.9.0-050900-generic linux-cloud-tools-5.9.0-050900-generic You may also want to install one of the following packages to keep up to date: linux-tools-generic linux-cloud-tools-generic hmmm... reboot mit Kernel 5.4.0-92 usbip list -r 10.2.3.174 Exportable USB devices ====================== - 10.2.3.174 1-1: Van Ooijen Technische Informatica : unknown product (16c0:2ab5) : /sys/devices/platform/soc/20980000.usb/usb1/1-1 : Miscellaneous Device / ? / Interface Association (ef/02/01) ...schon besser! systemctl start usbip.service dmesg | grep usb [ 4019.067442] usb 3-1: new full-speed USB device number 2 using vhci_hcd [ 4019.243437] usb 3-1: SetAddress Request (2) to port 0 [ 4019.353701] usb 3-1: not running at top speed; connect to a high speed hub [ 4019.621838] usb 3-1: New USB device found, idVendor=16c0, idProduct=2ab5, bcdDevice=47.90 [ 4019.621853] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 4019.621868] usb 3-1: Product: LED-PLAYER M [ 4019.621875] usb 3-1: Manufacturer: DIAMEX GmbH [ 4019.621884] usb 3-1: SerialNumber: 19322-20816-880 [ 4019.677287] usbhid 3-1:1.0: couldn't find an input interrupt endpoint [ 4020.361338] usbcore: registered new interface driver cdc_acm Success!!! ``` ## TPM2 - serielles Protokoll TPM ist die Abkürzung für „Transport Protocol for Matrices“, ein beliebtes Datenprotokoll zur Ansteuerung von LED-Panels. Viele frei erhältliche Programme unterstützen dieses Protokoll inzwischen, wie z.B. JINX oder GLEDIATOR. https://www.ledstyles.de/index.php?thread/18969-tpm2-protokoll-zur-matrix-lichtsteuerung/ ## TPM2.net - TPM2 über LAN/WLAN (UDP) Header ist anders! https://gist.github.com/jblang/89e24e2655be6c463c56 siehe auch: Handbuch zum LED Player M ## Beispiel SourceCode für TPM2 und TPM2.net https://github.com/mrfaptastic/Glediator3/tree/master/src/Output https://github.com/neophob/PixelController/tree/master/pixelcontroller-core/src/main/java/com/neophob/sematrix/core/output/tpm2 https://github.com/mrfaptastic/Glediator3/tree/master/esp32-arduino https://github.com/Aircoookie/WLED/blob/master/wled00/udp.cpp https://github.com/rstephan/TPM2 ## andere Protokolle: DMX, ArtNet, sACN https://de.wikipedia.org/wiki/DMX_(Lichttechnik) https://www.lightjams.com/artnet.html ArtNET is the perfect way to send and receive many DMX universes or to connect multiple lighting consoles together. Since it uses the network to transmit and receive data, no special DMX cable and converter are needed. https://www.lightjams.com/sacn.html Streaming ACN (sACN) is a standard protocol developed by ESTA to efficiently transport DMX universes over the network. It is comparable to ArtNET in many aspects. Art-Net is capable of broadcast and unicast, while sACN is capable of unicast and multicast. **sACN = E1.31** ANSI E1. 31 - 2018, Entertainment Technology - Lightweight streaming protocol for transport of DMX512 using ACN, is a revision of the 2016 standard. It describes a mechanism to transfer DMX512A packets over a TCP/IP network using a subset of the ACN protocol suite. ## RaspberryPi als TPM2.net to TPM2 gateway sudo apt install python3-serial pi@raspberrypi:~ $ lsusb Bus 001 Device 002: ID 1a86:7523 QinHeng Electronics HL-340 **USB-Serial adapter** dmesg -w [ 669.374263] usbserial: USB Serial support registered for ch341-uart [ 669.374371] ch341 1-1:1.0: ch341-uart converter detected [ 669.405708] usb 1-1: ch341-uart converter now attached to **ttyUSB0** python3 ./TPM2net2serial.py - hat mit einem arduino TPM2 Client nicht funktioniert - möglicherweise weil TPM2 und TPM2.net Heder unterschiedlich sind. Mit dem Matedisplay habe ich es noch nicht getestet. ``` import serial import socket import time vSocket=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) # IP-Adresse tServerAddress=('192.168.8.121',65506) vSocket.bind(tServerAddress) # serial device, baudrate vSerial=serial.Serial('/dev/ttyUSB0',baudrate=115200,bytesize=serial.EIGHTBITS,parity=serial.PARITY_NONE,stopbits=1) while True: byData, _ = vSocket.recvfrom(1024) vSerial.write(byData) time.sleep(0.02) ``` ## content & content creation * Jinx! -> output device (TPM2) -> redirect to file * Gimp * https://www.piskelapp.com/ * http://www.live-leds.de/user-jinxscripts/ * https://cloud.c3re.de/apps/files/?dir=/c3re.de_Chaostreff/2_Projects/36c3/Matedisplay-content ## Ideen & Eigenentwicklungen * Pixelflut server * MQTT * blinkenlights content * Kamera Videostream verbessern, so dass mehrere User schauen können. * (headless) glediator oder pixelcontroller oder jinx auf dem Raspberry Pi - momentan ist auf dem Pi keine GUI * Gif-Animation Weihnachtsbaum * Wiedergabe auf Knopfdruck in der Zeche - z.B. Klingelknopf am Gebäude * Games: snake, pong, breakout, tetris https://www.tinkerforge.com/en/doc/Kits/Blinkenlights/Blinkenlights.html * DONE: Matedisplay-Simulator https://github.com/mherweg/matesim * WIP: Konverter von TPM2.net auf TPM2: https://github.com/mherweg/TPM2net2serial * DONE: Simulator/Player für TPM2 Dateien: https://github.com/mherweg/matesim/blob/main/tpm2-file-player.py ![](https://github.com/mherweg/matesim/blob/main/Screenshot_20220124_045127.png?raw=true) ## fun facts 70W Unterschied zwischen Display dunkel und hell ca. 30W standby für Display, Raspberry und ESP32-Cam ## CCC Göttingen https://jugendgruppe.cccgoe.de/projekte/matelight.html --- ## Janaur 2022 Das Display steht in der Eingangshalle der Zeche. Durch die Fenster der Hackerhütte ist es gut zu sehen. TODO: * MateDisplay-WebCam installieren ? * Molton Stoff trocknen & reinigen --- ## Themenabend "Inhalte für's Matedisplay(*) erstellen" (*) oder andere RGB LED Displays Ort: https://meet.nerd.re/hackerhuette (online) Zeit: Mittwoch, 12.1.2022 20:00Uhr ### Agenda * LED Player M (https://www.led-genial.de/mediafiles/Sonstiges/LED-Player-M_Anleitung.pdf) * TPM2 und [TPM2.net](https://gist.github.com/jblang/89e24e2655be6c463c56) * PixelController * gLEDiator [Fork on git](https://github.com/mrfaptastic/Glediator3) * Jinx! * https://ossia.io * Appell: write code || make pixel-art (z. B. https://www.piskelapp.com) * Austausche von Erfahrungen und Ideen --- ## weitere Software (noch nicht getestet) * https://ossia.io/ * https://www.qlcplus.org/ * Madrix: kommerziell, kein TPM2(.net) ? .
{}