Open smcd253 opened 3 years ago
I see some improvements for you.
leds.show()
two lines up. Inside the if-statement. Don't update the LEDs on every frame, only if they match your universe-filter.leds.show()
is called on every universe. That is 5x60ms equals 300ms! About 3fps.setPixelColor()
call is fast. This solution assumes the 5 universes are send/received basically with no gap, an a "long" time after the last one. These are my first tips. If it doesn't help come back and ask again.
Good points! I'll try them out and will let you know what I find.
Using 5 universes ( i know could be less but the way my fixtures are set up makes 5 universes easier). Using Adafruit NeoPixel as my LED driver. Writing out of GPIO3 (Rx). Board: Nodemcu 1.0 ESP12E
I've been experiencing pretty drastic latency with this setup, but this makes no sense given the refresh time for NeoPixel is 30ms for 1000LEDs as is described in this article.
I've simplified onDmxFrame() as follows:
Here are the relevant definitions as well:
I guess I could hash the universe matching but i don't think that's the issue. I'm thinking it's because the Artnet packets are being dropped when the esp is stuck in onDmxFrame(). I found an interrupt-based (async) sACN library that solved this issue, but my visualizer program only supports artnet.
I have 9 strips all being powered in parallel by a 5v/10a power supply with 16AWG wiring, so no voltage drop to contribute to signal loss. The data line snakes through the setup with the 22AWG wire that is standard for the ws2812b. The lag isuniversal for the whole setup, though, so i don't think this is the issue.
I'm unicasting packets for each universe using Resolume at 30 fps. My computer is also hard-wired in, so the only considerable network latency is between the router and the node. I can also unicast to 7+ nodes with no drop in performance.
I have a feeling there's a way to make this many LEDs possible with the esp8266, but I can't see any readily available solutions. Would love any tips!
Here's a link to the client code for more detail.