rstephan / ArtnetWifi

Arduino library for Art-Net (artnet) over WiFi, send and receive DMX data. Runs on ESP8266, ESP32, Pi Pico W, WiFi101 and WiFiNINA devices.
Other
353 stars 59 forks source link

Delay #34

Closed hex-1 closed 1 year ago

hex-1 commented 2 years ago

I am using an ESP32 and a custom made PCB to covert an art-net signal to a 0-10v analogue signal for a dimmer rack however i am noticing some issues with delay. increasing the brightness of a fixture is delayed by approximately 4 seconds and decreasing the brightness is approximately 8 seconds.

During development i had it set so that i sent values via the serial monitor and that was instant so i know it isn't an issue with my circuitry or the way im interfacing with it.

i can also see that other devices on my network react instantly even over WIFI so i believe my transmission is fine.

This is my code https://pastebin.com/RdDEFgNu

Any help would be appreciated. Thanks

rstephan commented 2 years ago

Hi, I have tried your code and it's looking good, at least with my hardware setup (ESP32 and oscilloscope). Your code is fine. To make the code more robust, add a bit rang-checking to length and offset in onDmxFrame. I can't explain any delay from the code. In most cases it is more likely a WiFi issue. Sometimes the ArtNet transmitter is quite demanding in terms of bandwidth. It can easily emit many 100 packets/s.

How do you make the analog voltage from the PWM output? RC-filter? Maybe the time-constant is a bit off?

Try my ArtnetWifiDebug example and check the transmitter output with the serial monitor output.