fix max number of bytes to be sent

This commit is contained in:
Frank
2026-01-25 16:15:24 +01:00
parent 82f713093e
commit 2628e9167d

View File

@@ -153,7 +153,7 @@ void SparkFunDMX::update() {
//Send DMX data //Send DMX data
DMXSerial.begin(DMXSPEED, DMXFORMAT, rxPin, txPin);//Begin the Serial port DMXSerial.begin(DMXSPEED, DMXFORMAT, rxPin, txPin);//Begin the Serial port
DMXSerial.write(dmxData, min(dmxMaxChannel, chanSize)); DMXSerial.write(dmxData, min(dmxMaxChannel+1, chanSize)); // send max 513 bytes = start byte + 512 channels
DMXSerial.flush(); DMXSerial.flush();
DMXSerial.end();//clear our DMX array, end the Hardware Serial port DMXSerial.end();//clear our DMX array, end the Hardware Serial port
} }