fixed ESPDMX

This commit is contained in:
RaffaelW 2024-11-03 12:32:21 +01:00
parent d9485b4537
commit 04b605b7d4
2 changed files with 3 additions and 2 deletions

View file

@ -19,12 +19,13 @@
// uint8_t dmxDataStores[MAX_IDS][DMXCHANNELS + 1]; // uint8_t dmxDataStores[MAX_IDS][DMXCHANNELS + 1];
// Set up the DMX-Protocol // Set up the DMX-Protocol
void DMXESPSerial::init(int pinSend, int pinRecv) void DMXESPSerial::init(int pinSend = 19, int pinRecv = -1)
{ {
sendPin = pinSend; sendPin = pinSend;
recvPin = pinRecv; recvPin = pinRecv;
SERIALPORT.begin(DMXSPEED, DMXFORMAT, recvPin, sendPin); SERIALPORT.begin(DMXSPEED, DMXFORMAT, recvPin, sendPin);
pinMode(sendPin, OUTPUT); pinMode(sendPin, OUTPUT);
dmxStarted = true;
} }
// Function to read DMX data // Function to read DMX data

View file

@ -27,7 +27,7 @@ class DMXESPSerial
public: public:
int sendPin; int sendPin;
int recvPin; int recvPin;
bool started; bool dmxStarted;
uint8_t dmxDataStore[DMXCHANNELS + 1]; uint8_t dmxDataStore[DMXCHANNELS + 1];
void init(int pinSend, int pinRecv); void init(int pinSend, int pinRecv);