1 post • Page 1 of 1
I've been playing around with the https://www.sparkfun.com/products/15110. I can read the DMX data pretty reliably (there is an occasional misread, like a channel offset) and send DMX data as well (in separate sketches) but I'd like to build a MQTT<->DMX bridge that listens to the DMX bus until there's no data for 1000 ms at which point it transmits DMX data according to MQTT payloads every X ms switching to receiving mode in between to check if the other DMX master becomes active again. It works for a short while until I think my ESP32 hangs. I suspect the switching back and forth between receive & transmit mode is causing the problem but I don't understand enough to see the problem. I modified the Sparkfun DMX library and the Example2-DMXInput sketch to include a receive timeout and then switch to sending/receiving. I think that as long as my sketch doesn't switching between sending & receiving more than 4 times before the other DMX master sends data, it works. I suspect my problem has something to do with the interrupt timer/alarm. What's the best way to either disable the timer/alarm or ignore any data I send while also listening to the DMX bus?
Who is online
Users browsing this forum: No registered users and 12 guests