cnlohr / esp8266_dmx_explorer

33 stars 4 forks source link

Alternate DMX routines #1

Open jonshouse1 opened 4 years ago

jonshouse1 commented 4 years ago

Just in case you want to give it a go have an alternate set of DMX routines.

dmx.txt

cnlohr commented 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.

jonshouse1 commented 4 years ago

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?