This commit is contained in:
Will Tatam
2023-03-24 09:55:02 +00:00
parent d3dee2afa6
commit 49e58b29c9
3 changed files with 6 additions and 5 deletions

View File

@@ -95,12 +95,16 @@ void handleDMX() {}
#ifdef WLED_ENABLE_DMX_INPUT
#include <esp_dmx.h>
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

View File

@@ -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

View File

@@ -132,10 +132,6 @@
#endif
#endif
#ifdef WLED_ENABLE_DMX_INPUT
#include <esp_dmx.h>
#endif
#include "src/dependencies/e131/ESPAsyncE131.h"
#ifdef WLED_ENABLE_MQTT
#include "src/dependencies/async-mqtt-client/AsyncMqttClient.h"