I’ve created a 32x32 matrix (1024 LEDs total) with ws2812b LEDs. I have a raspberry pi communicating with an Arduino mega 2560 over serial port via USB.
Using some advice I read online I only write when the Arduino requests data. This is to prevent overflowing the Arduino’s serial buffer while FastLED has interrupts to meet WS2812b’s strict timing.
Everything works, but my frame rate is only 10 fps. This surprises me. Writing to 1024 ws2812b LEDs should take ~30ms. RGB data for 1024 leds is 3072 bytes. At 1,000,000 baud should take ~25ms. That’s 55ms for a single frame from my raspberry to the matrix. So I expected 18 fps- not 10fps.
I think the transmission over USB is what’s the bottleneck. I’ve timed the serial write in my Java source and it takes 70ms, not 25. Could someone lend me some advice?