# DMX out

**URL:** <https://wled.discourse.group/t/dmx-out/3483>\
**Category:** Uncategorized\
**Created:** [August 30, 2021, 4:18am UTC](https://wled.discourse.group/t/dmx-out/3483 "2021-08-30T04:18:32Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krismad](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@Krismad](https://wled.discourse.group/u/Krismad)\
**Post date:** [August 30, 2021, 4:18am UTC](https://wled.discourse.group/t/dmx-out/3483/1 "2021-08-30T04:18:32Z")

</div>

Hi, i am trying to get the DMX out working on a eps32. so far i am able to compile a working version without uncommenting the #define WLED\_ENABLE\_DMX line.  
whenever i uncomment this line as explained in the DMX out wiki the esp32 ends up in an infinite error loop. i am using platformio and have been trying to do this since version 10.  
is there annyone that has been able to get this working?

---

<div class="post-metadata">

**Author:** ![srg74](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/srg74/32/3018_2.png) [@srg74](https://wled.discourse.group/u/srg74)\
**Post date:** [August 31, 2021, 2:46pm UTC](https://wled.discourse.group/t/dmx-out/3483/2 "2021-08-31T14:46:20Z")

</div>

Try this it might work for you [WLED-wemos-shield/resources/Firmware/WLED\_wemos\_shield/v0.13.0-b2 at master · srg74/WLED-wemos-sh](https://github.com/srg74/WLED-wemos-shield/tree/master/resources/Firmware/WLED_wemos_shield/v0.13.0-b2)

---

<div class="post-metadata">

**Author:** ![huggy-d1](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/huggy-d1/32/51_2.png) [@huggy-d1](https://wled.discourse.group/u/huggy-d1)\
**Post date:** [August 31, 2021, 6:42pm UTC](https://wled.discourse.group/t/dmx-out/3483/3 "2021-08-31T18:42:00Z")

</div>

… removed … original reply was incorrect

---

<div class="post-metadata">

**Author:** ![divsys](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@divsys](https://wled.discourse.group/u/divsys)\
**Post date:** [September 2, 2021, 2:04pm UTC](https://wled.discourse.group/t/dmx-out/3483/4 "2021-09-02T14:04:44Z")

</div>

Not exactly true…

> [@huggy-d1](#):
>
> I do not believe WLED outputs DMX.

Check out the docs… [https://kno.wled.ge/interfaces/dmx-output/](https://kno.wled.ge/interfaces/dmx-output/)

WLED definitely will output DMX data, although it takes a recompile to do so.

---

<div class="post-metadata">

**Author:** ![huggy-d1](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/huggy-d1/32/51_2.png) [@huggy-d1](https://wled.discourse.group/u/huggy-d1)\
**Post date:** [September 2, 2021, 3:01pm UTC](https://wled.discourse.group/t/dmx-out/3483/5 "2021-09-02T15:01:11Z")

</div>

Wow, totally missed that one in the change logs. Thanks for posting. Edited my incorrect reply above…

---

<div class="post-metadata">

**Author:** ![Krismad](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@Krismad](https://wled.discourse.group/u/Krismad)\
**Post date:** [September 2, 2021, 7:17pm UTC](https://wled.discourse.group/t/dmx-out/3483/6 "2021-09-02T19:17:15Z")

</div>

thanks all for the reply but is there somebody that has succeded in getting this to work? annyone?  
the plan is, like i hace read the instructions, to be able to get DMX out from artnet input and to generate R G B channels from the pixelcolors in the ledstrip. so what i plan to do is have a 300 led ledstrip and have some DMX driven floodlights that generate an background color comparable to the philips ambilicht that generates a background color to a TV screen. since version 10 i am trying to do that.

---

<div class="post-metadata">

**Author:** ![Krismad](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@Krismad](https://wled.discourse.group/u/Krismad)\
**Post date:** [September 2, 2021, 7:30pm UTC](https://wled.discourse.group/t/dmx-out/3483/7 "2021-09-02T19:30:57Z")

</div>

“Dramatic music” and a dry voice speaking the words “Two years later” .  
i found that the only way to get the compiled version to run on esp32 with uncommented “#define WLED\_ENABLE\_DMX” is to change the line “WLED\_GLOBAL uint16\_t e131ProxyUniverse \_INIT(0)” also in Wled.h to “WLED\_GLOBAL uint16\_t e131ProxyUniverse \_INIT(1)”  
That way i get the extra tab DMX Output in The config screen where i can assign functions to output channels. But no DMX output no matter witch pins i choose for led data or DMX out pin.  
there is a wiki page so there must be someone outthere that knows how to get this working or that has used this function.

---

<div class="post-metadata">

**Author:** ![nturley](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/nturley/32/1913_2.png) [@nturley](https://wled.discourse.group/u/nturley)\
**Post date:** [September 2, 2021, 7:34pm UTC](https://wled.discourse.group/t/dmx-out/3483/8 "2021-09-02T19:34:42Z")

</div>

Yes it is possible. The default output pin is GPIO2. (pinD4 on NodeMCU)

I don’t believe you want to change this line:  
WLED\_GLOBAL uint16\_t e131ProxyUniverse \_INIT(1)

This will effectively not send to DMX from WLED, and would set the base ArtNet Universe to 1 (I believe)

Are you trying to run the DMX lights from WLED or another source?

---

<div class="post-metadata">

**Author:** ![nturley](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/nturley/32/1913_2.png) [@nturley](https://wled.discourse.group/u/nturley)\
**Post date:** [September 2, 2021, 10:04pm UTC](https://wled.discourse.group/t/dmx-out/3483/9 "2021-09-02T22:04:20Z")

</div>

Alright, so I’ve done some digging…

Basically right now the DMX output pin is hardcoded to pin 2 as I said. That’s because this is Serial1 on the ucontroller.

NodeMCU does support additional hardware serial sending on pin 15, however this can only be used with [Serial.Swap()](https://forum.arduino.cc/t/nodemcu-serial-communication-serial-swap-explained/643454) function, as far as I can tell.

Serial is also used for Debugging/ sending back over UART so I’m not 100% sure if we can use this or not. So far I have not had success in sending DMX over TX2 (GPIO15)

Another option (possibly easier) would be to use SoftwareSerial library. I am not sure if this would handle the load of DMX but it is worth a shot…

Quick Edit: I actually did get the second DMX output working! WooHoo! I was able to use Serial.Swap to output to pin15. So this can use both UARTs for DMX. I am not sure what will happen since Serial is now used by DMX but it appears to mostly be used for Debugging.

---

<div class="post-metadata">

**Author:** ![nturley](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/nturley/32/1913_2.png) [@nturley](https://wled.discourse.group/u/nturley)\
**Post date:** [September 3, 2021, 7:27pm UTC](https://wled.discourse.group/t/dmx-out/3483/10 "2021-09-03T19:27:47Z")

</div>

OK more learnings today…

I figured out that I can indeed send two DMX signals. I am sending one over pin15 with Serial and Serial.Swap(). I am sending the other over Serial1 on pin2 (this can’t be changed as far as I can tell.)

I also have a better understanding now of how DMX is implemented in WLED which confirms some assumptions but also creates some new challenges with how multiple universes should operate…

Writing some notes here to keep track of findings and also open to ideas…

Basically DMX can be used in two ways:

1. DMX Proxy Mode  
This takes the ArtNet or sACN data and immediately bounces it to DMX. This should be fairly trivial to implement a second Universe as we can just take the Universe from ArtNet, etc… and write it to the appropriate port. For this we would essentially need to have two proxy universes selectable in the UI.

One issue I am having here is getting the proper Art-Net universe from the ESPAsyncE131 library and I’m not quite sure why… I am sending Universe 1 and 0 and they are both getting sent to the same DMX channel…

1. LED Strip Mode  
Basically WLED treats DMX lights as part of an RGB LED strip. This gets a bit more complicated because if I understand how WLED works if basically fills up a universe with 510 RGB LEDs then moves on to the next, etc… This isn’t really conducive to setting up multiple universes, unless you’re literally just lining up RGB cans or something like that… but even then if you are mixing fixtures you’re going to have a rough time setting this up properly.

---

<div class="post-metadata">

**Author:** ![Krismad](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@Krismad](https://wled.discourse.group/u/Krismad)\
**Post date:** [September 4, 2021, 4:48am UTC](https://wled.discourse.group/t/dmx-out/3483/11 "2021-09-04T04:48:42Z")

</div>

Hi nturley, thanks for the reply. but i still do not know how to get the wled compiled and get it to work on a esp32. whatever i try folowing the wiki instructions, whatever pins i choose i end up with a esp32 rebooting over and over again. it would be nice if someone explained how to get this thing working first.  
How the different modes work and what pins are usable we find out later. i use the olimex esp32-poe hardware. The best thing would be if we could get the gpio 4 pin to spit out DMX.  
i have made other non led related projects running on this hardware using all pins with hardwareserial with multiple rs232 outputs running together with a web interface and so. if i complile a wled version with DMX disabled everything works fine, ethernet enabled multiple led datapins, all works fine until i uncomment the WLED\_ENABLE\_DMX line.

---

<div class="post-metadata">

**Author:** ![nturley](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/nturley/32/1913_2.png) [@nturley](https://wled.discourse.group/u/nturley)\
**Post date:** [September 7, 2021, 4:01pm UTC](https://wled.discourse.group/t/dmx-out/3483/12 "2021-09-07T16:01:02Z")

</div>

Hey Krismad,

Sorry for hijacking your thread. I realize now what I was working on was not that relevant. Oops!

I have not actually tried with ESP32. I am using ESP8266 NodeMCU clone devboard. I am going to order some though, so will get back to you on that.

In the meantime, maybe some of the info in this issue will help?

> <https://github.com/Aircoookie/WLED/issues/1336>
>
> Hey, so I'm trying to enable DMX on an ESP32 and it gets stuck in a bootloop, ne…ver even gets to initial setup screen. Is there a better version to use?
> 
> - Board: ESP32 dev (ESP32-WROOM-32)
> - Version WLED v0.10.2
> - Format Self compiled from Arduino IDE
> 
> Let me know if there's anything I can add. I literally only disabled websockets and enabled dmx.
> 
> Thank you for your help!

---

<div class="post-metadata">

**Author:** ![Krismad](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@Krismad](https://wled.discourse.group/u/Krismad)\
**Post date:** [September 7, 2021, 5:35pm UTC](https://wled.discourse.group/t/dmx-out/3483/13 "2021-09-07T17:35:06Z")

</div>

Hi nturley,  
Unfortunately all is leading to a dead end.  
I am glad you “hijacked” the thread, so it looks like you got DMX out working on ESP8266.  
an option for my project is having a ESP8266 with wled and DMX out enabled and having it in sync with the ledstrip on the ESP32.  
did you get wled with DMX out working on the ESP8266?

---

<div class="post-metadata">

**Author:** ![nturley](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/nturley/32/1913_2.png) [@nturley](https://wled.discourse.group/u/nturley)\
**Post date:** [September 7, 2021, 6:36pm UTC](https://wled.discourse.group/t/dmx-out/3483/14 "2021-09-07T18:36:16Z")

</div>

Yes! I have gotten DMX output working with ESP8266.

I am using this shield:

> **[ESP8266/NodeMCU 2 Universe DMX Board by inpublic space on Tindie](https://www.tindie.com/products/inpublic/esp8266nodemcu-2-universe-dmx-board/)**
>
> NodeMCU 2 Output DMX Decoder Board

The first universe works fine without any changes to the code just compile with that #define uncommented, or with the compiled binary linked on that page. The second universe also works with the method I mentioned above. I need more time to figure out how to integrate that intelligently with WLED…

---

<div class="post-metadata">

**Author:** ![jk007](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/jk007/32/2867_2.png) [@jk007](https://wled.discourse.group/u/jk007)\
**Post date:** [February 22, 2022, 2:45pm UTC](https://wled.discourse.group/t/dmx-out/3483/15 "2022-02-22T14:45:45Z")

</div>

Hello, I’m trying to get my setup to work on a D1 mini - No luck.

TTL - TX pin is connected to Wemos D1 pin 2 (D4). I’m running the latest master release
