Open jonshouse1 opened 4 years ago
Looks like basically what I'm doing already. Though it highlights that it would be good to make the baud rate web-configurable.
DMX512 specifies a fixed 250k bit baud rate so I am not sure that would be useful have it configurable?
Good project as always :-) I did notice a couple of things in your code that might be worth a tweak.
Your procTask() seems to be setting up the UART for each DMX frame, it only needs to be setup once when the system starts.
As far as I know the the underlying Wifi code is independent of the O/S and events so you should be able to use the UDP receive buffer without copying the data first. If you send DMX directly from the UDP receive handler then will effectively rate limit the send rate to the the DMX baud rate. It works out at about 40Hz if sending all 512 DMX values per frame, currently as far as I can tell you always update at 10Hz?
Just in case you want to give it a go have an alternate set of DMX routines.
dmx.txt