diff --git a/wled00/dmx.cpp b/wled00/dmx.cpp index 24604d24..0a9d1ae4 100644 --- a/wled00/dmx.cpp +++ b/wled00/dmx.cpp @@ -95,12 +95,16 @@ void handleDMX() {} #ifdef WLED_ENABLE_DMX_INPUT + +#include + + dmx_port_t dmxPort = 2; void initDMX() { /* Set the DMX hardware pins to the pins that we want to use. */ int dmxTransmitPin = 2; int dmxReceivePin = 27; - int dmxEnablePin = -1; + int dmxEnablePin = 26; dmx_set_pin(dmxPort, dmxTransmitPin, dmxReceivePin, dmxEnablePin); /* Now we can install the DMX driver! We'll tell it which DMX port to use and diff --git a/wled00/wled.cpp b/wled00/wled.cpp index 1fce9b31..fc2fb129 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -438,6 +438,7 @@ void WLED::setup() #endif #ifdef WLED_ENABLE_DMX_INPUT //reserve GPIO2 and 27 as hardcoded DMX pins pinManager.allocatePin(2, true, PinOwner::DMX); + pinManager.allocatePin(26, true, PinOwner::DMX); pinManager.allocatePin(27, true, PinOwner::DMX); #endif diff --git a/wled00/wled.h b/wled00/wled.h index 70fa9e46..cf13af11 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -132,10 +132,6 @@ #endif #endif -#ifdef WLED_ENABLE_DMX_INPUT -#include -#endif - #include "src/dependencies/e131/ESPAsyncE131.h" #ifdef WLED_ENABLE_MQTT #include "src/dependencies/async-mqtt-client/AsyncMqttClient.h"