So my first approch faild gloriously, I need some hints.
What I have is a selfbuilt WS2812 matrix 32x64 Pixel. I also habe a mp4 video (in the same resolution), which should be displayed on the matrix.
First try was (actually by my son, he does the programming, I do teh hardware):
Converting each frame into the according RGB matrix (at 25fps) with a python programm and direct the output into a textfile ( I know that this is not the most resource saving way, but quick to do). I think the teensy 3.2 we use for driving the Display should have enought memory to handle that.
Sadly I can't figure that out, because the arduino IDE crashes while c&p the file.
Our next approach would be to use a Pi (or any other PC) to deliver the frames "on the fly" via UART to the teensy and let it only do the matrix driving.
But I really would like to get it running on the teensy stand alone. Any other ideas to handle that one?
Prefereable something that is doable in a few days without investing some 100 Euros?
Not exacly sure, because that part is done by my son. So I'l asked him to provide that info.
As a rought calculation:
24 sec times 25 frames 600 frames, each containing RGB info for 2048 LEDS, that would be close to 4MB, plus seperators should be 8MB already.
I was wondering, if some trick already exists like for the other compressions to only hand over the pixels that actualla have changed from teh last frame and rewrite the matrix instead of holding the data of all frames ...
EDIT: Me: idiot! 264 kb flash memory is a lot, but not enough for that info. So I guess having a raspi feeding the frames and letting the teensy "only" do the displaying work should be the right path...
Calculate how many bytes you are transferring per frame. Then you can see how long it takes for any baud rate. I2C is slow it is about the same as a baud rate of 9600.
The AdaFruit neopixel library will only work on the model 1 raspberry Pi not on the 2 or 3.
ok, that would be RGB for 2048 pixel, that is 6144, but then I'm abit lost to calculate that to a baudrate.
As I understand it, I'll need the clockspeed of the teensy for that calculation?
Is that the CPU speed (I guess not) or the bandwith mentioned here: https://www.pjrc.com/teensy/teensy31.html
(I know, I#m a overnoob..)
EDIT: Got knowledge: 6144 bytes per pic, that is about 48 kbit, which means 2,5 pics per second max at 115200 (so I#ll need at least 10 times of that, which doesn't exist for UART, so I'm out)
No it is simply
For one frame 6144 bytes
It takes 10 serial bits to send one byte so to transfer one frame in a second you need 61440 baud. For 25 frames per second you need a speed of 61440 * 25 = 1536000 baud.
Which Is equal to forget it.
OK after we got it working and I ctched up some more sleep:
One problem is that the raspi delivers 3.3V on GPIO, but the WS2812 need 5V. I couldn't get hands on a stepup chip in time, but a friend jummped in, delivering hardware, time and programming.
I'll try that in future projects. The proplem wasn't to get the circuit. I simply didn't found a hardwarestore, that had one in stock with opening hours between 9:00pm and 3:00am (yes that way around :-)).
I'll post a link to some pics and movies the moment the owner puts it online (he promised to do so from gamescom, where the display is currently installed)