PiXelTubes/README.md

103 lines
6.7 KiB
Markdown
Raw Normal View History

2024-02-08 15:30:29 +00:00
# PiXelTubes
### A little introduction :)
PiXelTubes is a little fun project for me. **(CURRENTLY WORK IN PROGRESS)**
It is inspired by the Astera Helios/Titan tubes. The most classic, state of the art LED tubes for event lighting.
So maybe the question comes up, why I don't just buy some of them and use them. For me a big problem is the price and also I wanted a little project for my holiday week. So I thought why not build a cheap alternative with some led strips and some Raspberry Pi's.
BTW excuse the very "creative" name, but every Raspberry Pi project has to have a "Pi" in it's name.
For this project you will need a soldering iron and atleast a bit of knowledge on how to solder because you will have to solder the strip to the Raspberry Pi Zero.
### Before we start with what you need to build your own PiXelTube system here are some ideas on how to integrate those PiXelTubes.
For the beginners or "newbies" to lighting you can use free solutions like QLC+ for a small setup. Only problem with QLC+ is that pixel control is a bit complex.
If you want to be a bit more professional but don't want to pay any money you can use MA Lighting dot2. Still pixel control is a bit of a hassle but if you get it running it is awsome. There are some good online courses out there for the software. It is kind of semi-professional, so you have to get a bit more into the rabbit hole.
For the professionals out there, most of you will already know how to pixel control/map such fixtures but here is a list of the software I would recommend:
* [MADRIX](https://madrix.com) (Made specificly for pixel mapping/control.)
* [Resolume Arena](https://resolume.com) (Originally made for visual playback but you can output DMX to such pixel fixtures and map you visuals to them.)
* [grandMA3](https://malighting.com/grandma3/) (If you already spend all your money on that sweet little onPC node it is still a good solution. I mean the selection grid is a good way to map the pixels as subfixtures)
* [grandMA2](https://malighting.com/product-archive/products/grandma2/) (I personally havn't used grandMA2 because I started with grandMA3 but I think it would also be possible to map the pixels in some do-able way.)
* Software I only heard of but that also should work:
* [ENTTEC LED MAPPER](https://enttec.com/product/dmx-lighting-control-software/pixel-mapping-software/) (ELM)
* [PIXXEM](https://chromateq.com/pixxem/)
* [MadMapper](https://madmapper.com)
* [Touchdesigner](https://derivative.ca)
### The fixture profiles for various solutions:
* grandMA3 GDTF: **work in progress**
* grandMA2/dot2: **work in progress**
* Resolume Arena: **work in progrss**
### What you need on the hardware side:
* As a master server I am using a Raspberry Pi 4 B 4GB. You can probably use somthing smaller, but I haven't tested that right now.
* MicroSD card (16gb recommended)
* Raspberry Pi 4 power supply (I have the official one)
* Raspberry Pi 4 case (also here the official one)
* Raspberry Pi 4 fan (optional, but recommended. I have the pimoroni one *not sponsored*)
* For the tubes I am using:
* WS2812B LED strip (1 meter, 30 LEDs) (I don't put a link here because I bought them off of eBay and maybe the seller doesn't sell them in the future. Just google "WS2812B LED strip 30 leds 1m". On eBay they are most of the time even cheaper then on chinese sites.)
* Raspberry Pi Zero W
* Another MicroSD card (minimum 8GB)
* Small powerbank (idk just look for something that fits your usage and online time)
* Raspberry Pi Zero Case (I have the official one)
* Some wire for soldering the strip
* And you need a defusor tube for the strip (I am still looking for one so if I find one I am going to also put a link here)
## Now the software installation part:
### PiXelTube Master (PXM) for me it's is a Raspberry Pi 4 as I already mentioned:
* Download the Raspberry Pi Imager [here](https://www.raspberrypi.com/software/).
* Plug the MicroSD card for your PXM into your computer.
* Click "Choose model" > "No filtering".
* Click "Choose OS" > "Raspberry Pi OS (other)" > Raspberry Pi OS Lite (64-bit).
* Click "Select SD card" and select the SD card you want to install the OS to. **Be carefull** if you acidentially select the wrong drive (e.g. your important USB drive with goverment confidential document on) **all data on it will be earesed**** because it will be formated in order to install the OS.
* Click "Next" > "Edit settings".
* Input a hostname (e.g. "pxm"), a username and password (pxm and a password that you can remember or that you've written down somewhere) and **don't** set-up a wifi, because the software is using the wifi module.
* Go to the tab "Services" > "Enable SSH".
* Now click on "Save" > "Yes" > "Yes" and now you can sit back and wait while the imager is installing the operating system on the MicroSD card.
* When the imager is done, plug in the MicroSD card into the Raspberry Pi via the MicroSD slot.
* Before plugging in the powersupply connect the Pi via a Ethernet cable router.
* Now plug in the power and go to the webpage of your router. From there go into the list of all devices that are online. This is router/manufacturer specific, so if you don't know how to do it take a look in the manual for the router online or as in the manual that was in the box with the router.
* After 30 seconds to 2 minutes you should see your Pi with the hostname you gave it.
* The Pi should have an IP address. Copy it or write it down.
* Now open a terminal on your computer.
* Windows: Press the windows key on your keyboard and type the word "cmd" and hit enter.
* MAC: Press "command"+"space" and type "terminal" and hit enter.
* Linux: Hey, I know that you as a linux user already know how to do this, so I don't need to explain how to do this ;)
* Now in the terminal type the following command: `ssh <username you set for the pi>@<ip address of the pi>`
* A promt should appear to enter a password. Just enter the password you set for the PI.
* Now comes the fun part of just copy pasta ;)
```
sudo apt install python3 python3-pip git python3-flask python3-flask-mysqldb python3-adafruit-circuitpython-neopixel python3-wifi apache2 php mariadb-server mariadb-client -y
sudo mysql -u root -p
# Enter the password you set for the pi
CREATE DATABASE IF NOT EXISTS pixeltube_db;
USE pixeltube_db;
CREATE TABLE IF NOT EXISTS tubes (
id INT AUTO_INCREMENT PRIMARY KEY,
mac_address VARCHAR(17) NOT NULL UNIQUE,
universe INT NOT NULL,
dmx_address INT NOT NULL,
CONSTRAINT mac_address_format CHECK (LENGTH(mac_address) = 17 AND mac_address REGEXP '([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})')
);
create user 'pxm'@'localhost' IDENTIFIED by 'pixel';
grant all privileges on pixeltube_db . * to 'pxm'@'localhost';
flush privileges;
sudo systemctl restart apache2
```